Yesterday i've auto-blocked my root privileges on a remote server.

I was trying to enabling ssh access for a non priviliged user (not in the sudoer list) and i've added the line "AllowUsers unprivileged_user" on my sshd_config.

Unfortunally i've forget to add root the allowed users list and now i'm unable to enter the shell with root account or perform sudo commands from the only user allowed :(

There's any chance to solve the problem? I was thinking launching a login command inside the ssh session for the unpriviliged user and loggin in as root, but it's possible?

The server is running also a Parallel Plesk panel that is still accessible from root user, but apparently i can't access the / dir to configure sshd_config, if i go in the "Files" section of the panel i see only the root of the webserver dir.

Any clues?

1 Answer 1


Are you able to login as the other user still?

If so, you should be able to do su - root or su - privilegedaccount? For whatever account you know the password for. With su you need to know the password of the account you are trying to become.

  • Thanks, it works flawlessy! I've forgot that "su -" it's indipendent from the sudoer list...
    – salvob
    May 24, 2016 at 8:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.