3

I'm running lxc on Linux Mint Debian Edition tracking Wheezy/Sid. I created a container using "lxc-create -t debian -n dev". In accordance with the Debian wiki article on LXC I have mounted the cgroups file system as /cgroup and have added "cgroup_enable=memory" to the "GRUB_CMDLINE_LINUX_DEFAULT" setting to enable cgroup memory controls (not sure if this is still required but shouldn't hurt, I'm running kernel 3.2.0-1-amd64).

After starting the container I added a user and everything seems to be fine. If I try to log into the system with the new user I get the following:

# ssh dev@dev
dev@dev's password: 


The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Feb  1 07:37:28 2012 from lxc-host
Could not chdir to home directory /home/dev: Permission denied
/bin/bash: Permission denied
Connection to dev closed.

and using su as the root user inside the system produces the following:

root@dev:~# su -c bash dev
su: User not known to the underlying authentication module

Any ideas on what I need to do to allow me to login as this user?

BTW, here's an ls of /home to show that the directory is in fact present:

root@dev:~#  ls -al /home/dev
total 12
drwxr-xr-x 1 dev  dev    54 Feb  1 07:33 .
drwxr-xr-x 1 root root    6 Feb  1 07:33 ..
-rw-r--r-- 1 dev  dev   220 Nov 30 11:01 .bash_logout
-rw-r--r-- 1 dev  dev  3085 Nov 30 11:01 .bashrc
-rw-r--r-- 1 dev  dev   675 Nov 30 11:01 .profile

Additionally here are relevant auth.log entries for the ssh attempt followed by the su attempt:

Feb  1 19:15:44 dev sshd[3599]: Accepted password for dev from 192.168.254.1 por
t 43667 ssh2
Feb  1 19:15:44 dev sshd[3599]: pam_unix(sshd:session): session opened for user 
dev by (uid=0)
Feb  1 19:15:44 dev sshd[3601]: Received disconnect from 192.168.254.1: 11: disc
onnected by user
Feb  1 19:15:44 dev sshd[3599]: pam_unix(sshd:session): session closed for user 
dev

...

Feb  1 19:17:19 dev su[3606]: Successful su for dev by root
Feb  1 19:17:19 dev su[3606]: + /dev/pts/0 root:dev
Feb  1 19:17:19 dev su[3606]: pam_unix(su:session): session opened for user dev 
by root(uid=0)
Beau
  • 131
  • 1
  • 3
  • Necromancy comment, but what the hey. If you're still having trouble with this, run `getent passwd dev` and let us know the output. – Andrew B Apr 05 '13 at 21:20

0 Answers0