# Restricting root logins

**URL:** <https://linux-tips.com/t/restricting-root-logins/207>\
**Category:** Security\
**Created:** [October 6, 2008, 10:27am UTC](https://linux-tips.com/t/restricting-root-logins/207 "2008-10-06T10:27:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mike](https://linux-tips.com/user_avatar/linux-tips.com/mike/32/148_2.png) [@mike](https://linux-tips.com/u/mike)\
**Post date:** [October 6, 2008, 10:27am UTC](https://linux-tips.com/t/restricting-root-logins/207/1 "2008-10-06T10:27:24Z")

</div>

Pressing `Ctrl-Alt-F4` will give you a prompt for `tty3`. Note that it is one number less.

Take a look at the contents of `/etc/securetty` file.

To prevent root from logging in on this device, take out _tty3_ from this listing. Note, you can always login as another user, then, su to root. Below is an example of the default “/etc/securetty” that allows root to login to everything:

```
cat /etc/securetty
console vc/1 vc/2 vc/3 vc/4 vc/5 vc/6 vc/7 vc/8 vc/9 vc/10 vc/11 
        tty1 tty2 tty3 tty4 tty5 tty6 tty7 tty8 tty9 tty10 tty11
```
