操作系统
一、VM虚拟机添加用户组和用户名时报错: sudo提示用户不在sudoers文件中的解决方法
添加一个新的用户组Tester时,无法正常添加,提示:sudo groupadd -g 5400 Tester[sudo] password for ty:ty 不在 sudoers 文件中。
1、切换到root用户
[ty@ty ~]$su root
2、查看/etc/sudoers文件权限,将只读权限,修改为可写权限
[root@ty ty]# ll /etc/sudoers
[root@ty ty]# chmod 777 /ect/sudoers
[root@ty ty]# ls -l /etc/sudoers
3、修改 /etc/sudoers文件
[root@ty ty]# echo 'ty ALL=(ALL) ALL'>> /etc/sudoers
4、保存退出ÿ