adduser
useradd
-d : set home directory
-m : create home directory
[ -g : existed_group ( default : groupname = username ) ]
delete user
-r คือ ให้ลบ Home Directory too
groupadd
groupdel
change the password
Add user to sudoer file
user group that should be added
- adm
- sudo
- lpadmin
- sambashare
http://askubuntu.com/questions/7477/how-can-i-add-a-new-user-as-sudoer-using-the-command-line
or use GUI :
System > Administration > Users and Groups
$ sudo adduser testuser Adding user `testuser' ... Adding new group `testuser' (1001) ... Adding new user `testuser' (1001) with group `testuser' ... Creating home directory `/home/testuser' ... Copying files from `/etc/skel' ... Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Changing the user information for testuser Enter the new value, or press ENTER for the default Full Name []: thisisjustatest Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [y/N] y
useradd
$ sudo useradd -d /home/testuser -m [ username ]
-d : set home directory
-m : create home directory
[ -g : existed_group ( default : groupname = username ) ]
delete user
$ userdel -r testuser
-r คือ ให้ลบ Home Directory too
groupadd
groupdel
change the password
$ sudo passwd [ username ]
Add user to sudoer file
$ sudo adduser <username> sudo
user group that should be added
- adm
- sudo
- lpadmin
- sambashare
http://askubuntu.com/questions/7477/how-can-i-add-a-new-user-as-sudoer-using-the-command-line
or use GUI :
System > Administration > Users and Groups
ความคิดเห็น