LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 01-11-2011, 08:01 AM   #1
fbmd
LQ Newbie
 
Registered: Nov 2010
Location: Germany
Distribution: Gentoo
Posts: 10

Rep: Reputation: Disabled
su authentication failure without password prompt


Hi,

I have a strange behaviour on a Slackware 13.1 box:

Code:
user@host$ su
su: Authentication failure
user@host$
Note that there is no password prompt.

When I 'strace su' there is a password prompt, but using su over strace results in an authentication failure anyway.

Using su as root works fine:

Code:
root@host# su user
user@host$
Normal logins and ssh work fine, too.

I am a little lost at where to start. Any ideas would be greatly appreciated.

Regards,
fbmd
 
Old 01-11-2011, 08:20 AM   #2
arunpmenon
LQ Newbie
 
Registered: Sep 2010
Posts: 10

Rep: Reputation: 0
Please confirm setuid bit is set for the command su.
 
Old 01-11-2011, 09:15 AM   #3
fbmd
LQ Newbie
 
Registered: Nov 2010
Location: Germany
Distribution: Gentoo
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by arunpmenon View Post
Please confirm setuid bit is set for the command su.
Code:
root@host# ls -l /bin/su
-rws--x--x 1 root root 56229 2010-02-28 20:16 /bin/su
Confirmed.
 
Old 01-11-2011, 11:42 AM   #4
honeybadger
Member
 
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855

Rep: Reputation: Disabled
What about /etc/login.defs and related files? Any changes made to them?
Another thought - check aliases - I messed things sometimes there .
 
Old 01-12-2011, 05:18 AM   #5
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
Another place to have a look at could be /etc/pam.d/su whether there is anything used like pam_wheel.so while the user in question not being a member of group wheel. In your first example you are trying to gain root access - is an su for a normal user working in case he wants just to switch to another ordinary user?
 
Old 01-13-2011, 06:53 AM   #6
fbmd
LQ Newbie
 
Registered: Nov 2010
Location: Germany
Distribution: Gentoo
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by SilverBack View Post
What about /etc/login.defs and related files? Any changes made to them?
No changes made. Active settings in /etc/login.defs:

Code:
CHFN_AUTH		yes
CHFN_RESTRICT		frwh
CONSOLE		/etc/securetty
CONSOLE_GROUPS		floppy:audio:cdrom:video
DEFAULT_HOME	yes
ENVIRON_FILE	/etc/environment
ENV_HZ		HZ=100
ENV_PATH	PATH=/usr/local/bin:/bin:/usr/bin
ENV_SUPATH	PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin
ERASECHAR	0177
FAILLOG_ENAB		yes
FAIL_DELAY		3
FTMP_FILE	/var/log/btmp
GID_MAX			60000
GID_MIN			  100
HUSHLOGIN_FILE	.hushlogin
KILLCHAR	025
LASTLOG_ENAB		yes
LOGIN_RETRIES		5
LOGIN_TIMEOUT		60
LOG_OK_LOGINS		no
LOG_UNKFAIL_ENAB	no
MAIL_CHECK_ENAB		yes
MAIL_DIR	/var/spool/mail
MD5_CRYPT_ENAB	yes
MOTD_FILE	/etc/motd
NOLOGINS_FILE	/etc/nologin
OBSCURE_CHECKS_ENAB	yes
PASS_ALWAYS_WARN	yes
PASS_CHANGE_TRIES	5
PASS_MAX_DAYS	99999
PASS_MIN_DAYS	0
PASS_MIN_LEN	5
PASS_WARN_AGE	7
PORTTIME_CHECKS_ENAB	yes
QUOTAS_ENAB		yes
SU_NAME		su
SU_WHEEL_ONLY	no
SYSLOG_SG_ENAB		yes
SYSLOG_SU_ENAB		yes
TTYGROUP	tty
TTYPERM		0620
UID_MAX			60000
UID_MIN			 1000
UMASK		022
USERGROUPS_ENAB yes
The user in question has UID 1000. GID of "users" is 100.

Quote:
Originally Posted by Reuti View Post
Another place to have a look at could be /etc/pam.d/su whether there is anything used like pam_wheel.so while the user in question not being a member of group wheel.
The system is not using pam, i.e. there is no /etc/pam.d.

Quote:
Originally Posted by Reuti View Post
In your first example you are trying to gain root access - is an su for a normal user working in case he wants just to switch to another ordinary user?
No, it's the same: authentication failure whithot a password prompt.

I have just tried the following: I added the user to the "wheel" group. Then I changed ownership of /bin/su to root.wheel. That obviously removed the SUID bit:

Code:
$ ls -l /bin/su
-rwx--x--x 1 root wheel 56229 2010-02-28 20:16 /bin/su
But running su now at least gives a password prompt, but still fails, no matter what the password:

Code:
user@host$ su
Password: 
su: Authentication failure
user@host$
The same when trying to change to another user.

I'd still be grateful for any other hints.

fbmd
 
Old 08-05-2012, 09:52 PM   #7
daidoji
LQ Newbie
 
Registered: Nov 2005
Location: Oakland, CA
Distribution: Slackware
Posts: 11

Rep: Reputation: 0
Was there ever any resolution to this issue?

Cause I'm having the same problem and I haven't quite figured it out myself either.
 
Old 08-14-2012, 01:05 PM   #8
honeybadger
Member
 
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855

Rep: Reputation: Disabled
Guess this is all that we can do here. What I think we should do next is boot up with a live medium and then edit the /etc/passwd and /etc/shadow and see if that helps. This is the only thing I can think of now really.
If you need any more info please post back.
BTW sorry for the delay I was out for a long long time and did not have access to the internet.
Hope this helps.
 
Old 08-14-2012, 11:49 PM   #9
daidoji
LQ Newbie
 
Registered: Nov 2005
Location: Oakland, CA
Distribution: Slackware
Posts: 11

Rep: Reputation: 0
Hmmm, unfortunately I am on a VPS and cannot perform that step :-( I'm actually trying to update (or downgrade) my udev libraries to see if its something related to that as it was hinted at in an Ubuntu post I have lost at the moment. If you can think of anything else please let me know!
 
Old 08-15-2012, 05:18 AM   #10
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
Are you using PAM? As there is the option to block users without a password, and you would get exactly the mentioned behavior of the first post:
Code:
auth    required        pam_unix2.so nullok
without nullok and empty password.
 
Old 08-16-2012, 12:35 AM   #11
daidoji
LQ Newbie
 
Registered: Nov 2005
Location: Oakland, CA
Distribution: Slackware
Posts: 11

Rep: Reputation: 0
I am not using PAM. I'm trying to su to a user with a password (ie my root account). I know it has a password because I can login with it.
 
Old 11-01-2012, 07:40 PM   #12
Sir_mba
LQ Newbie
 
Registered: Nov 2012
Posts: 4

Rep: Reputation: Disabled
Set root password first

You probably have not set your root password yet.
Set your password by:

sudo passwd

Then, you won't have that problem again.
 
Old 11-01-2012, 08:46 PM   #13
daidoji
LQ Newbie
 
Registered: Nov 2005
Location: Oakland, CA
Distribution: Slackware
Posts: 11

Rep: Reputation: 0
Sir_MBA. Please read the thread above.
 
Old 11-01-2012, 10:57 PM   #14
Sir_mba
LQ Newbie
 
Registered: Nov 2012
Posts: 4

Rep: Reputation: Disabled
I know, the thing that I mean is not your login password.
You just try 'sudo passwd', and set a password, and then 'su' again.
 
Old 11-06-2012, 01:10 PM   #15
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
Originally Posted by Sir_mba View Post
I know, the thing that I mean is not your login password.
You just try 'sudo passwd', and set a password, and then 'su' again.
So which password are you referring to?
 
  


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
at: Authentication Failure rl92694 Linux - General 4 10-22-2012 09:33 PM
su root: authentication failure (password correct) scs_24 Linux - Newbie 3 12-12-2009 01:07 AM
su - then password, returns authentication failure buccaneere Linux - Software 6 07-30-2009 08:14 AM
$su, Authentication Failure Eilya Ubuntu 9 10-14-2008 05:41 AM
Password authentication failure Sallow Red Hat 1 02-29-2008 04:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 02:34 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
Open Source Consulting | Domain Registration