我在Amazon EC2上运行ubuntu 14.04,并以默认用户“ ubuntu”登录。这里的问题是我不能以sudeor的身份运行命令。
当我尝试使用sudo运行命令时,我得到:
sudo:加载插件“ sudoers_policy”时,/ etc / sudo.conf,第0行出错
sudo:/usr/lib/sudo/sudoers.so必须由uid 0拥有
sudo:致命错误,无法加载插件
我到处搜索帮助,所有建议的解决方案都无法解决问题。
提前致谢
它s a bit lengthy procedure, but I got a way out. The ultimate objective is to gain access to root user. Step 1- Add a new user that does not need .ppk key to login. 1. Firstly stop your faulty instance and make a copy of the same EC2 instance. 2. Now in the AWS console, you will see a "Volumne" tab on the left hand side. Detach the volume of the faulty instance and attach with the new instance. 3. Now mount this newly attach drive in the new instance and add a new user into it. 4. Simply now create a new user and set permission that user don
吨需要一个.ppk密钥文件登录。
步骤2:获得root访问权限1.使用创建的该新用户登录后,只需键入“ su”命令。系统将要求您输入新用户的密码。2.输入密码,现在您将成为root用户。您不再需要sudo了。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句