0
I've installed a tomcat docker image based on Debian9. There is something weird with user creation I don't understand.
I'm root and I add an user with
useradd adminuser
No home directory is created...well. I create it. I add a password to the user with
passwd adminuser
I add the user to sudoers with
usermod -aG sudo adminuser
(I have actually to install sudo with apt-get install sudo)
Now if I log as adminuser with
su adminuser
Password is not asked. Second, I can't sudo (sudo command not found) nor I have common commands available to root like java...
I also see that there is no /etc/sudoers file...
What is wrong?
I add /etc/sudoers with
%sudo ALL=(ALL:ALL) ALL
but nothing changes. Adding export PATH in ~/.bashrc I can get commands as root though, but not sudo. I also add /bin/bash to /etc/passwd...as there was nothing
I did install sudo indeed. The purpose of the container actually is to test some installations on centos without using virtual machines like VirtualBox – Glasnhost – 2019-10-12T08:49:05.477