Adding user to chroot environment

Posted by Neo on Ask Ubuntu See other posts from Ask Ubuntu or by Neo
Published on 2011-01-30T16:34:54Z Indexed on 2011/01/30 23:33 UTC
Read the original article Hit count: 371

Filed under:
|
|

I've created a chroot system in my Ubuntu using schroot and debrootstrap, based on minimal ubuntu. However whenever I can't seem to add a new user into this chroot environment. Here is what happens.

  1. I enter schroot as root and add a new user 'Bob'.(Tried both adduser and useradd commands)
  2. The username 'Bob' lists up in /etc/passwd file and I can 'su' into the user 'Bob'. So far so good.
  3. When I log out of schroot, and re-enter schroot, the user 'Bob' has vanished!! There is no mention of Bob in /etc/passwd either.

How do I make the new user permanent?

© Ask Ubuntu or respective owner

Related posts about users

Related posts about chroot