>Linux PAM , Lock account in Linux using pam_listfile.so

By | July 10, 2010

>Dear friend as an admin every day my boss gives a list of different users for login denied

so i use :->

root#passwd -l user1
for that users for locking &

root#passwd -u user1
for unlocking them

but i have 100 users lists every day

so it makes me busy for 1 hr every day

suddenly i remember about file /etc/vsftpd/ftpuser
then for the help of pam.d i applied it to login attempt
I just write in top of the file

root# vi /etc/pam.d/login
auth    required    pam_listfile.so item=user sens=deny file=/etc/logindeny onerr=succeed

:wq!

& then i create a file & write the name of user which would be denied for that day

root# vi /etc/logindeny

user1
user2
user3
user4

:wq!

& now every day i have to edit only that file & my users are denied for the day
It saves my time daily.

(Written and posted by amit gupta)

Share itShare on FacebookEmail this to someoneTweet about this on TwitterShare on Google+Share on LinkedInPrint this page

2 thoughts on “>Linux PAM , Lock account in Linux using pam_listfile.so

  1. Anonymous

    >You need a new boss. I can't believe any organization can withstand such a high level of dissension.

    Reply
  2. Anonymous

    >This is actually very useful to control the kids use of computer time.

    Thx for the information.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Current month ye@r day *