-1

我在 Amazon 的 EC2 上运行 ubuntu 14.04 并使用默认用户“ubuntu”登录,这里的问题是我无法以sudeor 身份运行命令。

当我尝试使用sudo运行命令时,我得到:

sudo:/etc/sudo.conf 中的错误,加载插件“sudoers_policy”时第 0 行

sudo:/usr/lib/sudo/sudoers.so 必须由 uid 0 拥有

sudo:致命错误,无法加载插件

我到处寻找帮助,所有建议的解决方案都未能解决问题。

提前致谢

4

1 回答 1

-1

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 了。

于 2015-05-10T12:46:31.657 回答