ubuntu支持多用户登入的,所以掌握多用户创建的技巧可以节省很多事情
useradd 具体的做法就看man adduser
1、创建用户,-m表示同时创建用户家目录
sudo useradd -m hadoop
2、为创建的hadoop用户设置密码
sudo passwd hadoop
3、为hadoop用户添加对/etc/sudoers目录的写权限,默认只有root拥有只读权限
sudo chmod u+w /etc/sudoers
4、在/etc/sudoers文件中找到下面两句
#User privilege specification
root ALL=(ALL:ALL) ALL
5、在下面添加一行
hadoop ALL=(ALL:ALL) ALL
6、撤销文件的写权限
sudo chmod u-w /etc/sudoers
www.gnu.org //英语要学好啊孩子,