LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-08-2008, 02:14 PM   #1
brgsousa
Member
 
Registered: Aug 2007
Location: Salvador, Brazil
Distribution: Debian, Ubuntu
Posts: 185

Rep: Reputation: 15
Double password check in Debian Etch login


Hi,
i am having a problem with linux login.
The old administrator did something with pam files i think. And now we have to enter user password twice to make it log in.
That is making automated scripts etc to go wrong.

Any clues so that it asks only one time?
 
Old 10-08-2008, 06:03 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Look at the pam configuration and see what modules are being used other than pam_unix.so in the auth stack. Particularly, anything like pam_ssh, pam_mount, etc. If so, they should usually be called with the try_first_pass option. Also, do the prompts look the same?
 
Old 10-09-2008, 06:58 AM   #3
brgsousa
Member
 
Registered: Aug 2007
Location: Salvador, Brazil
Distribution: Debian, Ubuntu
Posts: 185

Original Poster
Rep: Reputation: 15
The authentication screen from PuTTY looks like this:
Code:
Using username "root".
Using keyboard-interactive authentication.
Password:
Using keyboard-interactive authentication.
Password:
Last login: Wed Oct  8 19:24:04 2008 from 10.1.4.55
hostname_here:~#
Did you mean auth stack by this?
Code:
# ls /lib/security
pam_access.so   pam_limits.so       pam_rootok.so     pam_unix_passwd.so
pam_debug.so    pam_listfile.so     pam_securetty.so  pam_unix_session.so
pam_deny.so     pam_mail.so         pam_shells.so     pam_unix.so
pam_env.so      pam_mkhomedir.so    pam_smbpass.so    pam_userdb.so
pam_filter.so   pam_motd.so         pam_stress.so     pam_warn.so
pam_ftp.so      pam_nologin.so      pam_tally.so      pam_wheel.so
pam_group.so    pam_permit.so       pam_time.so       pam_winbind.so
pam_issue.so    pam_radius_auth.so  pam_unix_acct.so
pam_lastlog.so  pam_rhosts_auth.so  pam_unix_auth.so
 
Old 10-09-2008, 07:03 AM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
What distribution are you on? On Debian-based systems, we have /etc/pam.d that contains the pam configuration files which tell PAM which modules to load and what options to pass to those modules.
 
Old 10-09-2008, 07:11 AM   #5
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Oops, I totally had forgotten the subject of the thread. Guess I've already been looking at too many this morning.

Look at /etc/pam.d/common-auth and see if pam_unix is called twice.

Also, does logging in at the console generate a double prompt as well? Perhaps it's an issue with SSH's configuration if it's only via SSH.
 
Old 10-09-2008, 09:16 AM   #6
brgsousa
Member
 
Registered: Aug 2007
Location: Salvador, Brazil
Distribution: Debian, Ubuntu
Posts: 185

Original Poster
Rep: Reputation: 15
It looks like this:
Code:
#
# /etc/pam.d/common-auth - authentication settings common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of the authentication modules that define
# the central authentication scheme for use on the system
# (e.g., /etc/shadow, LDAP, Kerberos, etc.).  The default is to use the
# traditional Unix authentication mechanisms.
#
#auth   sufficient      pam_radius_auth
auth    sufficient      pam_winbind.so
auth    required        pam_unix.so nullok_secure
In console it asks twice too... :/

I just noticed that is not relevant what you enter for password for the first time. The second prompt that is checked
 
Old 10-09-2008, 09:19 AM   #7
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Are you authenticating against a domain? The first prompt is pam_winbind asking for the domain, and the 2nd is pam_unix. My guess is that there's no domain in use, or else a correct first password would 'suffice' via pam_winbind. If there's no domain in use, you can comment out the pam_winbind.so line.
 
Old 10-09-2008, 09:31 AM   #8
brgsousa
Member
 
Registered: Aug 2007
Location: Salvador, Brazil
Distribution: Debian, Ubuntu
Posts: 185

Original Poster
Rep: Reputation: 15
This server is a mail server that authenticates mail users in AD server. But i think this is misconfiguration.
If i comment this line
Code:
auth    sufficient      pam_winbind.so
will it work?
 
Old 10-09-2008, 11:04 AM   #9
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
It should work. I don't *THINK* pam.d/common-auth is used in the mail stack, but it depends on what mailserver you're using. Look and see if there's a pam.d/<mailserver> file with a separate configuration and make sure it doesn't have "@include common-auth" in it.
 
Old 10-13-2008, 01:03 PM   #10
brgsousa
Member
 
Registered: Aug 2007
Location: Salvador, Brazil
Distribution: Debian, Ubuntu
Posts: 185

Original Poster
Rep: Reputation: 15
Yes, it does interfere in dovecot configuration.

/etc/pam.d/dovecot:
Code:
#%PAM-1.0

@include common-auth
@include common-account
@include common-session
I commented "auth sufficient pam_winbind.so" line in common-auth and common-account files and email stoped authenticating.
 
Old 10-13-2008, 01:17 PM   #11
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
In common-auth, try adding "try_first_pass" to the pam_unix.so line, after nullok_secure.
 
Old 10-14-2008, 07:04 AM   #12
brgsousa
Member
 
Registered: Aug 2007
Location: Salvador, Brazil
Distribution: Debian, Ubuntu
Posts: 185

Original Poster
Rep: Reputation: 15
I commented 'account sufficient pam_winbind.so' line in common-auth, common-account and common-session.

And dovecot is like this now:
Code:
#%PAM-1.0

account sufficient      pam_winbind.so
auth    sufficient      pam_winbind.so
session required        pam_winbind.so

#@include common-auth
#@include common-account
#@include common-session
Now, everything is working
thanks for your help dude
 
Old 10-14-2008, 07:58 AM   #13
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
That works too Glad you got it fixed!
 
  


Reply



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
double check malikah Programming 1 07-13-2008 07:10 PM
Login problem - Debian Etch AMD64 r_avital Linux - Newbie 3 02-18-2008 06:33 PM
error in xp login in debian etch + samba +ldap xcore_on Linux - Networking 1 06-01-2007 08:31 AM
Partition check, check double check Vincentius Linux - General 0 12-25-2004 05:47 AM
Password Check is Passwords Skipped in Login Screen, Root System Settings Change in X edwardt Red Hat 1 07-06-2004 11:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:53 PM.

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
Open Source Consulting | Domain Registration