LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 04-20-2005, 12:54 PM   #1
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
Strange PAM/sudo problem (SLES9)


I installed SuSE Linux Enterprise Server 9 (RC5) and during the install I choose Blowfish for password hashing. I've had no problem authenticating to "login" or "sshd", but no matter what I do with sudo (yes, my user is in /etc/sudoers) it keeps saying "Sorry, try again".

Contents of /etc/pam.d/sudo (doesn't work) is simply:
Code:
#%PAM-1.0
auth     required       pam_unix2.so
Contents of /etc/pam.d/login (works):
Code:
#%PAM-1.0
auth requisite  pam_unix2.so    nullok     #set_secrpc
auth required   pam_securetty.so
auth required   pam_nologin.so
#auth    required       pam_homecheck.so
auth required   pam_env.so
auth required   pam_mail.so
account required        pam_unix2.so
password required       pam_pwcheck.so  nullok
password required       pam_unix2.so    nullok use_first_pass use_authtok
session required        pam_unix2.so    none     # debug or trace
session required        pam_limits.so
Conents of /etc/pam.d/sshd (works):
Code:
#%PAM-1.0
auth required   pam_unix2.so # set_secrpc
auth required   pam_nologin.so
auth required   pam_env.so
account required        pam_unix2.so
account required        pam_nologin.so
password required       pam_pwcheck.so
password required       pam_unix2.so    use_first_pass use_authtok
session required        pam_unix2.so    none     # trace or debug
session required        pam_limits.so
# Enable the following line to get resmgr support for
# ssh sessions (see /usr/share/doc/packages/resmgr/README.SuSE)
#session  optional      pam_resmgr.so fake_ttyname
And just for good measure, /etc/security/pam_pwcheck.conf:
Code:
password:       cracklib blowfish nullok use_cracklib
/etc/security/pam_unix2.conf:
Code:
auth:
account:
password:       blowfish
session:        none
So why this would work for login & sshd, but not sudo... I have no idea.
 
Old 04-20-2005, 02:14 PM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Original Poster
Rep: Reputation: 76
The plot thickens... by using strace I was able to discover that it was looking for the root password, not the user's password. Next I'm going to try using the sudo parameter to change this back to using user password...
 
Old 04-20-2005, 02:36 PM   #3
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Original Poster
Rep: Reputation: 76
Well I feel like a complete idiot. I had been scrolling down too far in the /etc/sudoers file and completely missed the fact that SuSE adds this by default:
Code:
# Defaults specification
Defaults targetpw    # ask for the password of the target user i.e. root
%users ALL=(ALL) ALL # WARNING! Only use this together with 'Defaults targetpw'!
Duuuuuh!

Commenting those two lines out (prefixing each with a '#') fixed the problem. Sigh.
 
Old 01-05-2006, 04:45 PM   #4
robthky
LQ Newbie
 
Registered: Sep 2003
Posts: 7

Rep: Reputation: 0
Thanks for posting. i ran into the same problem.

 
Old 02-01-2023, 07:20 PM   #5
mabboud123
LQ Newbie
 
Registered: May 2010
Location: Sydney, Australia
Distribution: CentOS, Ubuntu, Fedora, Red Hat and Debian
Posts: 2

Rep: Reputation: 0
Thank you for posting this -- bitten by this default behaviour on a SLES 12-SP1 system.

To be honest, had never seen this default on other distros.

Again, thanks!

Michael
 
  


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
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 03:20 PM
Problem of mounting USB disk in SLES9 coffeebreak SUSE / openSUSE 5 09-13-2005 05:05 AM
strange, strange alsa problem: sound is grainy/pixellated? fenderman11111 Linux - Software 1 11-01-2004 05:16 PM
vsftpd + pam + virtual users - Pam cannot load database file. mdkelly069 Linux - Networking 3 09-22-2004 11:07 PM
Problem with sudo punx120 Linux - Software 0 05-08-2004 10:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 08:10 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