អាយធីខ្មែរស៊ែរ : itkhmershare.blogspot.com

Add User

Monday, December 3, 20120 comments

[1] If you'd like to add new user, Do like follows.
pangolin@dlp:~$
sudo adduser ubuntu
# add a user "ubuntu"

[sudo] password for pangolin:
# own password

Adding user `ubuntu' ...
Adding new group `ubuntu' (1001) ...
Adding new user `ubuntu' (1001) with group `ubuntu' ...
Creating home directory `/home/ubuntu' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
# set password for a user

Retype new UNIX password:
# confirm

passwd: password updated successfully
Changing the user information for ubuntu
Enter the new value, or press ENTER for the default
Full Name []:
# if not needed, Enter with empty

Room Number []:

Work Phone []:

Home Phone []:

Other []:

Is the information correct? [Y/n]
y

pangolin@dlp:~$
[2] If you'd like to give a privileges to a new user, Do like follows.
pangolin@dlp:~$
sudo vi /etc/group
# near line 21: add in admin group

sudo:x:27:pangolin
,ubuntu
pangolin@dlp:~$
su - ubuntu

Password:
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
pangolin@dlp:~$
# try to execute a command which require privilege

[sudo] password for ubuntu:
# password for 'ubuntu'

ubuntu@dlp:~$
Broadcast message from root@dlp
(/dev/pts/0) at 22:25 ...
The system is going down for reboot NOW!  
# done
Share this article :

Post a Comment