Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/fsharp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google cloud platform 无法将sudo转换为深入学习映像_Google Cloud Platform_Sudo_Sudoers_Google Dl Platform - Fatal编程技术网

Google cloud platform 无法将sudo转换为深入学习映像

Google cloud platform 无法将sudo转换为深入学习映像,google-cloud-platform,sudo,sudoers,google-dl-platform,Google Cloud Platform,Sudo,Sudoers,Google Dl Platform,今天我安装了最新的Google CloudDeep Learning VM映像,VM启动后,我能够通过SSH web成功地执行sudo-I。 登录后,我开始在后台运行Tensorflow模型培训(使用&)。几个小时后,我无法以root用户身份登录。 我得到以下信息: We trust you have received the usual lecture from the local System Administrator. It usually boils down to these thr

今天我安装了最新的Google CloudDeep Learning VM映像,VM启动后,我能够通过SSH web成功地执行
sudo-I
。 登录后,我开始在后台运行Tensorflow模型培训(使用&)。几个小时后,我无法以root用户身份登录。 我得到以下信息:

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.
[sudo] password for my_username: 
我试过:

  • sudo-i
  • susudo-i
  • su root

我能够复制这个问题。有什么建议吗?

原始答案:

也许解决方案是登录到

附加答案

我不知道为什么,但有时用户突然不再是google sudoers组的成员。。。 然后,就可以由具有此组管理员权限的其他用户将您的用户添加到此组:

# usermod -G google-sudoers your_user_name

当然,如果有这样一个用户…

这个问题是由于谷歌内部的一方造成的,并将该用户从“谷歌sudoers”组中删除。对于所有受影响的实例,我建议遵循下面的解决方法,直到推出永久性修复

  • 请使用其他用户名:

    • 如果使用,请单击设置图标(右上角),然后单击下拉列表中的更改Linux名称
    • 使用SDK $gcloud compute sshnewusername@instance
  • 在实例上启用OS登录(在元数据中设置“Enable oslogin=True”),并根据此


  • 您可以按照以下步骤跟踪永久性修复

    我不清楚你犯了什么错误。查看这些消息,当您运行
    sudo
    时,它似乎在询问您请求根用户访问的用户名的密码。你输入密码了吗?如果是这样的话,您看到的倒数第二条消息是什么?作为参考,我通过SSH选项通过web浏览器连接。用户名是我连接的本地笔记本电脑用户名。我确实键入了自己的本地密码,并收到提示:[sudo]我的\u用户名的密码:抱歉,再试一次。(我总是感到抱歉,再试一次)奇怪的问题是,当我启动一个新的虚拟机时,它就工作了。只要我让它运行一个后台进程,使用&。我试图登录并解决同一问题。