disbale ssh for bnroot as root account
- by user2916639
i am beginner with centos - Linux
i have dedicated server . my root username is bnroot . now i am taking ssh using this user.
i want to disable ssh for bnroot. i have created user user name welcome i want take ssh login by welcome user then i ll use su - bnroot to get root privileges.
i have set PermitRootLogin no , AllowUsers welcome IN /etc/sshd_config and after restarting sshd service . i take ssh login by welcome use then it is ok. but when i use
su bnroot its prompt to password and i enter right passowrd it show su: incorrect password
, i dont know where i am wrong . please help me here.
changes i done -
/etc/ssh/sshd_confid
PermitRootLogin no
AllowUsers welcome
/etc/sudoers
welcome ALL=(ALL) ALL
getting error in /var/log/secure
unix_chkpwd[666]: password check failed for user (bnroot)
su: pam_unix(su:auth): authentication failure; logname=ewalletssh uid=503 euid=500 tty=pts/1 ruser=ewalletssh rhost= user=bnroot
please let me know where i am wrong