##账户管理相关
- 创建账户之后没有家目录
useradd pop
passwd pop
cp -a /etc/skel/ /home/pop
chown -R pop:linux /home/pop
修改 /etc/passwd
修改 pop:x:1001:1001::/home/pop:/bin/bash
//修改/etc/sudoers
//添加 pop ALL=(ALL:ALL) ALL
修改/etc/sudoers //确保你的pop 账户在 admin 中,当然,下面的配置 是指 admin 组的 配置
%admin ALL=(ALL)
改为
%admin ALL=(ALL) NOPASSWD: ALL
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Members of the admin group may gain root privileges
#%admin ALL=(ALL) ALL
%admin ALL=(ALL) NOPASSWD: ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
ubuntu ALL=NOPASSWD:ALL
# See sudoers(5) for more information on "#include" directives: