LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   user deny using pam (https://www.linuxquestions.org/questions/linux-newbie-8/user-deny-using-pam-568596/)

Karthi_India 07-11-2007 10:11 PM

user deny using pam
 
Hi All,

Can anybody help me to know...

How to make nologin user using pam?


Thanks in advance!

Regards,

Karthi

macemoneta 07-11-2007 10:41 PM

Why not just:

usermod -L -s /sbin/nologin

Karthi_India 07-11-2007 10:53 PM

Hi macemoneta,

Thanks, Can u tell me how to make it nologin user using PAM?

macemoneta 07-11-2007 11:02 PM

You want to prevent a user from login in, correct? As root, just issue the command:

usermod -L -s /sbin/nologin someuser

where 'someuser' is the userid. The user will not be permitted to login.

Karthi_India 07-11-2007 11:15 PM

Hi macemoneta,

Thanks, Can we deny any user login by editing the file /etc/pam.d/login?

Is that possible? pls give me any idea.

Regards,

Karthi

macemoneta 07-12-2007 08:17 AM

It's possible to use pam to limit logins, but you do that by editing /etc/security/access.conf. The file is normally just commented documentation - read it and you will learn how to use it.

However, using that method can completely lock you out of a system (including root access). I don't recommend it. If you are going to try anyway, make sure you have a bootable recovery disk available to correct errors.


All times are GMT -5. The time now is 05:34 AM.