新建用户
sudo useradd today -m -s /bin/bash
sudo passwd today
Enter new UNIX password:
Retype new UNIX password:
当前用户切换至today安装atop、htop等包
sudo /bin/su - today
sudo apt-get install htop atop
[sudo] password for today:
today is not in the sudoers file. This incident will be reported.
这里报“xxx is not in the sudoers file.This incident will be reported”
解决方法
chmod u+w /etc/sudoers
echo "today ALL=(ALL) ALL">>/etc/sudoers
chmod u-w /etc/sudoers