linux学习:增加user和sudo权限
2014-06-26 16:27
211 查看
linux
1.增加user
/usr/sbin/useradd hjuser
password hjuser 为hjuser设置密码
*****
2.以这个user登录,sudo su的时候报错
“hjuser is not in the sudoers file. This incident will be reported.”
解决方法:
超级用户下
1)打开/etc/sudoers文件:$vi /etc/sudoers
2)找到这一 行:"root ALL=(ALL) ALL"在起下面添加"xxx ALL=(ALL) ALL"(这里的xxx是你的用户名),“wq!”保存并退出。
"hjuser ALL=(ALL) ALL"
3.grep
grep 'ALL=' /etc/sudoers
在/etc/sudoers中搜索包含“ALL=”的字符
1.增加user
/usr/sbin/useradd hjuser
password hjuser 为hjuser设置密码
*****
2.以这个user登录,sudo su的时候报错
“hjuser is not in the sudoers file. This incident will be reported.”
解决方法:
超级用户下
1)打开/etc/sudoers文件:$vi /etc/sudoers
2)找到这一 行:"root ALL=(ALL) ALL"在起下面添加"xxx ALL=(ALL) ALL"(这里的xxx是你的用户名),“wq!”保存并退出。
"hjuser ALL=(ALL) ALL"
3.grep
grep 'ALL=' /etc/sudoers
在/etc/sudoers中搜索包含“ALL=”的字符
相关文章推荐
- Linux 为普通user增加sudo权限
- Linux下增加User及添加sudo权限
- linux权限管理之su与 sudo详解___username is not in the sudoers file
- ubuntu增加新用户并且添加sudo权限
- linux 增加用户 改密码 增加sudo权限
- ubuntu14.04增加一个用户并且给予sudo的权限
- Linux给用户增加sudo权限
- CentOS学习5_为CentOS普通用户增加sudo操作权限
- 为hadoop增加sudo权限
- linux权限管理之su与 sudo详解___username is not in the sudoers file
- wwwroot文件无读取某个文件夹权限(对IIS_USER增加全部权限)
- 增加用户的sudo权限
- ubuntu中增加用户级sudo权限设置
- 为用户增加sudo权限(修改sudoers文件)
- 为用户增加sudo权限(修改sudoers文件)
- Ubuntu增加sudo权限用户
- MySQL数据库增加用户权限GRANT/INSERT INTO user VALUES/FLUSH PRIVILEGES
- linux(ubuntu)为用户增加sudo权限
- redhat6 为普通用户增加sudo权限
- redhat enterprise linux普通用户增加sudo权限