# Console screen



## xy16644 (Aug 3, 2012)

I have noticed that when I sit at the console of my server (which is very rare) I have noticed that there is plenty of output on the screen about people logging in remotely (via SSH) and a few other lines of info that appear.

Is it possible to turn ALL of this output off on the console so that when someone looks at the screen ALL they see is the login prompt?


----------



## wblock@ (Aug 4, 2012)

Press alt-f2.


----------



## jmccue (Aug 4, 2012)

syslog.conf or
`$ man syslog.conf`
see /dev/console

John


----------



## xy16644 (Aug 11, 2012)

jmccue said:
			
		

> syslog.conf or
> `$ man syslog.conf`
> see /dev/console
> 
> John



I think thats what I was looking for. I ended up commenting out:

```
#*.err;kern.warning;auth.notice;mail.crit               /dev/console
```

in the /etc/syslog.conf and restarted the service:

```
/etc/rc.d/syslogd restart
```

I'll monitor it to see if it does the trick! Thanks!


----------



## phoenix (Aug 11, 2012)

if you do that, you should also uncomment the line for /var/log/console.log, so you don't miss anything important.


----------



## xy16644 (Aug 11, 2012)

phoenix said:
			
		

> if you do that, you should also uncomment the line for /var/log/console.log, so you don't miss anything important.



Thanks for that. I funny enough did uncomment it as follows:

```
console.info                                    /var/log/console.log
```

But my /var/log/console.log is not showing any new entries even after I have logged on a few times since making this change. Is this due to me commenting out the console line? 

I would like to log this activity but I don't want anything to appear on the console screen.


----------



## phoenix (Aug 14, 2012)

Did you restart syslog after editing the file?
`# service syslog reload`

(might be restart instead of reload)


----------



## izotov (Aug 14, 2012)

xy16644 said:
			
		

> But my /var/log/console.log is not showing any new entries even after I have logged on a few times since making this change.



If the same message appears several times one after the other only then syslog(3) waits till the last event occurs, prints one message only and a line saying something similar to "the last message repeated x times".
If the login event was the only that should have been written to your log file then the same might happen to you.
Try playing with logger(1) to test syslog(3) settings. And always send a message different from the previous.


----------



## xy16644 (Aug 14, 2012)

Thanks all!

What I ended up doing in/etc/syslog.conf was commenting out:

```
#*.err;kern.warning;auth.notice;mail.crit               /dev/console
```

and the copying the above line to a new line and changing it to:

```
*.err;kern.*;authpriv.none;mail.crit             /dev/console
```

I then added :

```
auth.notice                                     /var/log/console.log
```

and made sure this was uncommented:

```
console.info                                    /var/log/console.log
```

and restarted the service:

```
/etc/rc.d/syslogd restart
```

Now when I am sitting at the console the *only* thing I can see on the screen (currently) is the login prompt and my server name. This is exactly what I wanted. Its clean and more secure as its not displaying who is logging on remotely and what their usernames are.

I am curious to know if you can remove the server s hostname from the login prompt? That would be very nice if that was possible! :e


----------



## izotov (Aug 14, 2012)

xy16644 said:
			
		

> I am curious to know if you can remove the server s hostname from the login prompt? That would be very nice if that was possible! :e



It might be possible. This thread may help you suggesting using gettytab(5).


----------



## xy16644 (Aug 14, 2012)

Aaaah thanks for the link to that thread. I think if I remove "%h" from my /etc/gettytab file it will remove the hostname.

Once this change is made, is there a service that you need to restart for the change to take effect? Or is a reboot required?


----------



## izotov (Aug 15, 2012)

xy16644 said:
			
		

> Once this change is made, is there a service that you need to restart for the change to take effect? Or is a reboot required?



My gess is that already running terminals will display according to the old configuration, so they need a restart. I think an escape to single user mode and come back to multiuser would be enough (this is faster than a reboot but take care: network connections are lost, users are thrown out):
`# shutdown now`
Hit enter when it asks for the shell path. Now you are in single user mode. Go back to multiuser.
`# exit`


----------

