LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   How to assign a tty to a specific user (https://www.linuxquestions.org/questions/linux-security-4/how-to-assign-a-tty-to-a-specific-user-4175515614/)

leonavas 08-20-2014 04:31 PM

How to assign a tty to a specific user
 
Hi Guys

I'd like to know if there is a way to assign a tty to a specific user in linux, so that only that user account can access that tty and restrict access to the rest of ttys to that user

I'm currently using Debian wheezy 64 bit.

I'm unable to find information on how to do this or tutorials

Thanks in advance for all your help.

cliffordw 08-21-2014 01:48 AM

Hi there,

Welcome to the LQ forums!

Excuse my ignorance, but I'm not sure I understand what you are trying to do. More specifically, what do you mean by a tty?

The "tty" is usually the controlling terminal for your login session. Assuming you're on an Intel platform, and are not connecting via some form of serial connection (/dev/ttyS*), the tty is a fixed device (/dev/tty[0-6]) if you're physically logged in via the console, without X Windows. If this is what you are referring to, while I don't understand what you would achieve with such a config, you might be able to achieve it by looking at /etc/security/access.conf and PAM (see "man pam_access").

If you're in a graphical desktop, or connecting remotely (via SSH), the tty is assigned dynamically (/dev/pts/*), making it useless as an identifier of where the user is logged in from. For remote connections there are other mechanisms you can use, based on IP adresses. For example in SSH, you can do this with the sshd_config AllowUsers or AllowGroups options. The discussion at https://www.linuxquestions.org/quest...achine-756172/ might also help.

Regards,

Clifford


All times are GMT -5. The time now is 01:43 AM.