access denied: tty ‘tty1’ is not secure

On a CentOS 7 server, when login as user root on the console, login fails. If I log in as a normal user, then I am able to switch to user root with the command “su – root”.

On checking /var/log/secure, I found the following error.

To fix the error, edit the file

In the file, add

On CentOS 7 server, the contents of the file are

Permission for the file is 600, in case you have the wrong permission, change it with

Back to CentOS 7

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *