Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > Servers > Console user locked out - pam problems?

Forgot Password?
 Servers   Anything server related, Apache, MySQL, Samba, server security, sendmail, exim, etc

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 07-03-2009   #1 (permalink)
Just Joined!
 
Join Date: May 2009
Posts: 6
Console user locked out - pam problems?

I am trying to enable AD authentication for Debian stable servers to enable users to logon via ssh authenticating against Windows AD.It all works fine and I can ssh to the server using my Windows credentials but I have noticed this message on remote ssh logon when logging on as root:

Your account has been locked. Please contact your System administrator Your account has been locked. Please contact your System administrator Your account has been locked. Please contact your System administrator Last login: Sat Jun 13 14:15:14 2009 from workstation1 server1:~#

I have checked if I can login via local console as root and oops, I cannot.Same error pops up.This could kick me painfully in the future. At the same time I have tried the same setup for RedfHat and I don't have this problem. I believe the problem is somewhere in my pam configuration but can't see where.googling for error does not get me anywhere either.

below are details for corresponding pam files on Debian and redhat

common-account

account sufficient pam_winbind.so require_membership_of=S-1-5-21-602162358-1844823847-725345543-XXXXXX

account sufficient pam_winbind.so require_membership_of=S-1-5-21-602162358-1844823847-725345543-XXXXXX

account sufficient pam_winbind.so require_membership_of=S-1-5-21-602162358-1844823847-725345543-XXXXXX

account required pam_unix.so

common-auth

auth sufficient pam_winbind.so require_membership_of=S-1-5-21-602162358-1844823847-725345543-XXXXXX

auth sufficient pam_winbind.so require_membership_of=S-1-5-21-602162358-1844823847-725345543-XXXXXX

auth sufficient pam_winbind.so require_membership_of=S-1-5-21-602162358-1844823847-725345543-XXXXXX

auth required pam_unix.so nullok_secure

common-sesion

session required pam_mkhomedir.so skel=/etc/skel/ umask=0022 session sufficient pam_winbind.so require_membership_of=S-1-5-21-602162358-1844823847-725345543-XXXXXX

session sufficient pam_winbind.so require_membership_of=S-1-5-21-602162358-1844823847-725345543-XXXXXX

session sufficient pam_winbind.so require_membership_of=S-1-5-21-602162358-1844823847-725345543-XXXXX

session required pam_unix.so

RedHat system-auth file:

auth required pam_env.so auth sufficient pam_unix.so nullok try_first_pass auth sufficient pam_winbind.so use_first_pass auth requisite pam_succeed_if.so uid >= 500 quiet auth required pam_deny.so

account required pam_unix.so account sufficient pam_succeed_if.so uid < 500 quiet account sufficient pam_winbind.so use_first_pass account required pam_permit.so

password requisite pam_cracklib.so try_first_pass retry=3 password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok password sufficient pam_winbind.so use_first_pass password required pam_deny.so

session optional pam_keyinit.so revoke session required pam_limits.so session required pam_winbind.so use_first_pass session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid session required pam_unix.so session optional pam_mkhomedir.so skel=etc/skel/ umask=0027
daugavpils is offline  


Reply With Quote
Old 07-05-2009   #2 (permalink)
Linux Guru
 
Join Date: Oct 2007
Posts: 2,410
Are you sure you don't just have the root account locked on the server ... and I thought permit of root login over ssh was a really bad idea - things like rkhunter check for this.
Jonathan183 is offline   Reply With Quote
Old 07-05-2009   #3 (permalink)
Just Joined!
 
Join Date: May 2009
Posts: 6
OK, I found out that there is account called root on AD.
Stilit does not explain whya ssh connection fails over to shadow auth and console does not..
daugavpils is offline   Reply With Quote
Old 07-06-2009   #4 (permalink)
Linux Engineer
 
jledhead's Avatar
 
Join Date: Oct 2004
Location: North Carolina
Posts: 1,030
what do the logs say? does root fail because of winbind or pam? in my setup, login tries AD first and then falls back to local pam. so when I log in as root I get a fail in the logs for winbind but OK with pam.
jledhead is offline   Reply With Quote
Old 07-06-2009   #5 (permalink)
Just Joined!
 
Join Date: May 2009
Posts: 6
I have tested three servers and only one has probem. other ones are switching happily to shadow auth.Apologies for wasting your time...
daugavpils is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 12:40 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2