Search Our Database

How to create a new user to login as root privileges in linux

Last updated on |

In order to create a new user to log in as root privileges, SSH to the server and perform the steps below:

useradd test
passwd test

vi /etc/sudoers

## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
test ALL=(ALL) NOPASSWD: ALL

vi /etc/ssh/sshd_config

at the last line add
AllowUsers test

service sshd restart