Skip to content
Advertisement

linux – created duplicate root user, cant login anymore.. what do i do? [closed]

i became over zealous and ran the command here

http://www.shellhacks.com/en/HowTo-Create-USER-with-ROOT-Privileges-in-Linux

useradd -ou 0 -g 0 john
passwd john

now i try to connect the way i usually do

ssh -i yok.pem root@staging.yok.com -vv

and I’m getting

debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to staging.yok.com [23.23.77.124] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file yok.pem type -1
debug1: key_load_public: No such file or directory
debug1: identity file yok.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.9

i luckily still have one connection to the server open.. i checked my ~/.ssh folder and the files all have 600 permissions.

what do i need to do here im stuck 🙁

Advertisement

Answer

I changed ownership on /var/empty/sshd

chown root:root /var/empty/sshd

yayyy

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement