0

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?

salvob
  • 13
  • 1

1 Answers1

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.

Zoredache
  • 130,897
  • 41
  • 276
  • 420
  • Thanks, it works flawlessy! I've forgot that "su -" it's indipendent from the sudoer list... – salvob May 24 '16 at 08:29