4

I installed Ubuntu core on my raspberry pi3. After configuring it I have now ssh access to the pi using my ubuntu account and a private key. Now I want to create an additional user, to simplify the ssh process (since I don't always have that private key around and simply want to login in with username + pass).

So I tried

sudo useradd myusername

But that results in this error , but I get the error:

Cannot lock /etc/password; try again later

When I for example try to create a directory in the root of the file system, I get an error:

cannot create directory ‘test’: Read-only file system

When I the different partions with df, I see also that the partion of root (/) is 100% in use.

What is going on? How can I create that additional user?

9

You can create a local user with the adduser command if you use the option --extrausers:

sudo adduser --extrausers test

Example:

enter image description here

  • I tried that one as well, but that didn't work either, got simliar error. Did you execute this in ubuntu core? Or regular ubuntu.. ? – Maarten Kieft Jan 18 '17 at 12:46
  • This from a Ubuntu Core KVM instance. What error do you see? – Manik Taneja Jan 18 '17 at 18:07
  • I cannot replicate it anymore, I whiped the disk and installed mate. But the error was something about saying it wasn't able to create a usergroup for that specific user. It seems that all fails since the filesystem seems to be readonly .. – Maarten Kieft Jan 21 '17 at 12:37
  • Yes, the snaps are read-only. However, each snap has its own writable space. As such, we can create local users, add network interfaces, etc. Please let us know if you have any issues with this. – Manik Taneja Jan 25 '17 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.