Discussion Locked

Login on ttyS0

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I installed mgetty service on a linux Red Hat 7.1 in order to have an access point from external to manage assistance on a couple of unix/linux machines. The service functions properly. Now I would like to allow only an user to login into the linux machine on which runs mgetty when the attempt comes into ttyS0 (/dev/ttyS0=modem for mgetty). All other logins present in the system must be refused on a connection on ttyS0. I looked for /etc/login.access or /etc/usertty files but there aren't. Tried to create a /etc/login.access file but not solved (perhaps I wronged some passages).
Any suggestion?
Thanking You
Andy

5 replies

by bg4

You could try making the mgetty process owned by the user who is allowed to use it and set the permission to -rwx------. Its crude I know, but I used this method once to get out of a problem.

Hope this helps.

by gctr

If I understand this, when someone logs in via ttyS0 you want the system to not allow anyone else to login? Assuming you are logging in as root to this account, you can set the .profile to touch the file /etc/nologin if you are logging in via ttyS0.When this file exists, no user except root can log in. Look at the man page for login for details.

This discussion is closed to new replies.