如何在solaris上添加sudo用户?
我使用的是 Solaris 11,我已将用户添加到 sudo 用户文件(/etc/sudoers),但仍然提示输入密码。
arcsys@solaris:~$ sudo -l
User arcsys may run the following commands on solaris:
(ALL) NOPASSWD: /usr/bin/cat
(ALL) ALL
arcsys@solaris:~$ sudo cat /etc/sudoers
Password:
我无法理解这里出了什么问题? 任何帮助表示赞赏。
I am using Solaris 11 , I have added user to sudo user file ( /etc/sudoers) , still its prompting for password.
arcsys@solaris:~$ sudo -l
User arcsys may run the following commands on solaris:
(ALL) NOPASSWD: /usr/bin/cat
(ALL) ALL
arcsys@solaris:~$ sudo cat /etc/sudoers
Password:
I am not able to understand that what is wrong here?
Any help is appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要执行的命令是:
sudo
当您配置了程序的完整路径时是严格的The command you need to execute is:
sudo
is strict when you have configured the full path to the program(s)以 root 身份运行:
visudo
并检查以确保您的用户名已添加
root ALL=(ALL:ALL) ALL
arcsys ALL=(ALL:ALL) ALL
保存并退出,然后运行:
sudo "command"
系统将提示您获取您的密码。如果您有适当的访问权限,它将运行。如果没有,您需要以 root 身份运行 visudo,或者运行 sudo visudo。
As root, run:
visudo
and check to make sure your username is added
root ALL=(ALL:ALL) ALL
arcsys ALL=(ALL:ALL) ALL
Save, and quit, then run:
sudo "command"
The system will prompt you for YOUR password. If you have the proper access, it will run. If not, you will need to run visudo either as root, or by running sudo visudo.