Can’t su to login on other user

I have a Debian server, and I can SSH to it.. On SSH there I’m prompted to specify username and pass, I can login here as any user I want..

If I’m root I can change to other users, for example with: “su luxo” to login on user luxo.

But if I’m logged in as another user, I can’t login to root, or even other users.. It allways gives an “authentication failure” notify.

How can I solve this? If I want to change user now I have to open a new SSH session every time..

Answer

As far as I know you can’t switch from one user to another via su user – it has to be done as root user. Only way I know to do this as user is via sudo command, so it looks like

sudo su user

If you’re able to access root account by doing su or su - (which automatically cd’s to root $HOME) everything is ok.

Attribution
Source : Link , Question Author : Kaj , Answer Author : mkozak

Leave a Comment