简体   繁体   English

设置带有AWS EC2实例的RStudio服务器的密码

[英]Set password for RStudio Server with AWS EC2 instance

I managed to follow all the steps to create EC2 instance and install R Server on it. 我设法遵循了创建EC2实例并在其上安装R Server的所有步骤。

When I go to RStudio Server page to connect (which looks something like "ec2-[Public IP]-.eu-west-3.compute.amazonaws.com:8787") , I am asked a username and a password. 当我转到RStudio服务器页面进行连接(看起来像“ ec2- [公共IP]-。eu-west-3.compute.amazonaws.com:8787”)时 ,系统会要求我输入用户名和密码。

I figured out to set a username ("user1") this way: 我想出了这样设置用户名(“ user1”)的方法:

$ sudo useradd user1

But then when I try this command to write the password: 但是然后当我尝试使用此命令来写密码时:

echo user1:password | chpasswd

I receive this message: chpasswd: cannot lock /etc/passwd; 我收到此消息: chpasswd:无法锁定/ etc / passwd;。 try again later. 稍后再试。

I looked at different solutions suggested here: 我看了这里建议的不同解决方案:

https://superuser.com/questions/296373/cannot-lock-etc-passwd-try-again-later https://superuser.com/questions/296373/cannot-lock-etc-passwd-try-again-later

but I do not see a resolution to my problem. 但我看不到解决问题的方法。

I did not find either any passwd.lock, shadow.lock, group.lock, gshadow.lock files to remove. 我没有找到任何要删除的passwd.lock,shadow.lock,group.lock,gshadow.lock文件。

输入“ sudo passwd your_username ”,系统将提示您输入新密码

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM