增加新用户,使用adduser命令:
root@AY130925102139735305Z:/home#
sudo adduser xusongqin
Adding user `xusongqin' ...
Adding new group `xusongqin' (1000) ...
Adding new user `xusongqin' (1000) with group `xusongqin' ...
Creating home directory `/home/xusongqin' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for xusongqin
Enter the new value, or press ENTER for the default
Full Name []:
xusongqin
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n]
Y
root@AY130925102139735305Z:/home#
ls
xusongqin
为该用户增加sudo权限:
root@AY130925102139735305Z:
vi /etc/sudoers
##为用户添加sudo权限 xusongqin ALL=(ALL:ALL) ALL
# User privilege specification
root ALL=(ALL:ALL) ALL
xusongqin ALL=(ALL:ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
linux 新增用户及增加该用户sudo权限
猜你喜欢
转载自qson.iteye.com/blog/2055525
今日推荐
周排行