Hello,
I had a great install of CentOS on a container in Proxmox, with several users set up. I had to then change the container to be privileged as I needed to be able to create and used tun interfaces. Since that time I can no longer SSH into the container (but the webserver GUI I had set up does still work). When I go to use the console to figure out what is going on I can no longer login with the root account and when I use a user with sudo permission I see the following and cannot run any commands with sudo nor cd to the home directory.
I get a very basic shell prompt and can't use sudo (see below)
Is this normal for a privileged container? Is there anyway to get the normal shell back while maintaining privileged settings to be able to create and use tun interfaces?
For completeness the lines I changed/added in the config to get the tun to work were the following:
I had a great install of CentOS on a container in Proxmox, with several users set up. I had to then change the container to be privileged as I needed to be able to create and used tun interfaces. Since that time I can no longer SSH into the container (but the webserver GUI I had set up does still work). When I go to use the console to figure out what is going on I can no longer login with the root account and when I use a user with sudo permission I see the following and cannot run any commands with sudo nor cd to the home directory.
Code:
-- user: /home/user: change directory failed: Permission denied
Logging in with home = "/".
-bash: /home/user/.bash_profile: Permission denied
I get a very basic shell prompt and can't use sudo (see below)
Code:
-bash-4.2$ sudo ls
sudo: /etc/sudo.conf is owned by uid 100000, should be 0
sudo: /bin/sudo must be owned by uid 0 and have the setuid bit set
Is this normal for a privileged container? Is there anyway to get the normal shell back while maintaining privileged settings to be able to create and use tun interfaces?
For completeness the lines I changed/added in the config to get the tun to work were the following:
Code:
unprivileged: 0
lxc.cgroup.devices.allow = c 10:200 rwm
lxc.hook.autodev = sh -c "modprobe tun; cd ${LXC_ROOTFS_MOUNT}/dev; mkdir net; mknod net/tun c 10 200; chmod 0666 net/tun"