LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-11-2007, 10:11 PM   #1
Karthi_India
LQ Newbie
 
Registered: Apr 2007
Posts: 27

Rep: Reputation: 15
user deny using pam


Hi All,

Can anybody help me to know...

How to make nologin user using pam?


Thanks in advance!

Regards,

Karthi
 
Old 07-11-2007, 10:41 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
Why not just:

usermod -L -s /sbin/nologin
 
Old 07-11-2007, 10:53 PM   #3
Karthi_India
LQ Newbie
 
Registered: Apr 2007
Posts: 27

Original Poster
Rep: Reputation: 15
Hi macemoneta,

Thanks, Can u tell me how to make it nologin user using PAM?
 
Old 07-11-2007, 11:02 PM   #4
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
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.
 
Old 07-11-2007, 11:15 PM   #5
Karthi_India
LQ Newbie
 
Registered: Apr 2007
Posts: 27

Original Poster
Rep: Reputation: 15
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
 
Old 07-12-2007, 08:17 AM   #6
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
YUM Server deny user Ameii83 Linux - Newbie 2 02-27-2007 03:36 AM
deny ssh access with pam RobertCraven Linux - Security 5 05-12-2006 03:55 AM
Apache auth_pam / pam winbind deny failed user auth collen Linux - Security 3 04-10-2006 02:20 AM
how to deny user to use ftp to access system ust Linux - Software 4 05-23-2005 08:39 PM
How to restrict only one user can use telnet in /etc/hosts.deny? lzyking Linux - Software 2 02-12-2003 07:19 PM


All times are GMT -5. The time now is 04:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration