LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-28-2009, 11:07 AM   #1
decepticon
LQ Newbie
 
Registered: Apr 2009
Posts: 10

Rep: Reputation: 0
Authentication Failed on all New accounts


Hello,

I went through the Newbie threads in search of a possible answer to this question. I am able to login as root however when creating a new account I am getting Authentication Failed on any new accounts. Any help would be appreciated.

Here is what I am doing:

===============================================================
[root@localhost ~]# passwd joeblow
Changing password for user joeblow.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
================================================================

I then logout as root then go to login as the new user joeblow,
I type in the password
Then I get "Authentication Failed"

This has never worked for me and is happening on all new accounts

I am running CentOS 5

regards,

William

Last edited by decepticon; 04-28-2009 at 11:30 AM. Reason: adding information
 
Old 04-28-2009, 12:46 PM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 164Reputation: 164
Quote:
Originally Posted by decepticon View Post
Hello,

I went through the Newbie threads in search of a possible answer to this question. I am able to login as root however when creating a new account I am getting Authentication Failed on any new accounts. Any help would be appreciated.

Here is what I am doing:

===============================================================
[root@localhost ~]# passwd joeblow
Changing password for user joeblow.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
================================================================

I then logout as root then go to login as the new user joeblow,
I type in the password
Then I get "Authentication Failed"

This has never worked for me and is happening on all new accounts

I am running CentOS 5

regards,

William
Post a copy of your logs. My guess is you're having a pam issue of some variety or you have a permissions problem on one of the files.
 
Old 04-28-2009, 12:51 PM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,325

Rep: Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881
Quote:
Originally Posted by decepticon View Post
Hello,

I went through the Newbie threads in search of a possible answer to this question. I am able to login as root however when creating a new account I am getting Authentication Failed on any new accounts. Any help would be appreciated.

Here is what I am doing:

===============================================================
[root@localhost ~]# passwd joeblow
Changing password for user joeblow.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
================================================================

I then logout as root then go to login as the new user joeblow,
I type in the password
Then I get "Authentication Failed"

This has never worked for me and is happening on all new accounts

I am running CentOS 5

regards,

William
I agree with rweaver....the logs would be helpful, as would a permissions check.

I've had this in the past, when I've installed things (like portsentry, TCP wrappers, etc.), and the installer will dink around with the permissions on things. Your /etc directory should be 755 (drwxr-xr-x), /etc/passwd should be 644 (-rw-r--r--), and /etc/shadow 640 (-rw-r-----). /etc and /etc/passwd should be root:root, and shadow root:shadow.
 
Old 04-29-2009, 12:18 PM   #4
decepticon
LQ Newbie
 
Registered: Apr 2009
Posts: 10

Original Poster
Rep: Reputation: 0
Here is a snippet of the logfile of what I am seeing for an account I created for user: samsmith

========================================================================
[root@localhost audit]# cat /var/log/audit/audit.log | grep "samsmith" | more
type=USER_AUTH msg=audit(1241003388.434:38): user pid=2616 uid=0 auid=0 subj
=system_u:system_r:xdm_t:s0-s0:c0.c1023 msg='PAM: authentication acct="samsmith" : exe="/usr/sbin/gdm-binary" (hostname=?, addr=?, terminal=:0 res=success)'
type=USER_ACCT msg=audit(1241003388.465:39): user pid=2616 uid=0 auid=0 subj
=system_u:system_r:xdm_t:s0-s0:c0.c1023 msg='PAM: accounting acct="samsmith"
: exe="/usr/sbin/gdm-binary" (hostname=?, addr=?, terminal=:0 res=failed)'

[root@localhost audit]# ls -l /usr/sbin/gdm-binary
-rwxr-xr-x 1 root root 275960 Mar 9 18:14 /usr/sbin/gdm-binary

=======================================================================

Regarding permissions for those files mentioned. Here is what I am seeing:

-rw-r----- 1 root root 1237 Apr 29 07:09 /etc/shadow
-rw-r--r-- 1 root root 1963 Apr 29 07:09 /etc/passwd
-rwxr-xr-x 1 root root 275960 Mar 9 18:14 /usr/sbin/gdm-binary

thankyou for your help,

decep

Last edited by decepticon; 04-29-2009 at 12:33 PM. Reason: highlight
 
Old 04-29-2009, 03:27 PM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,325

Rep: Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881
Quote:
Originally Posted by decepticon View Post
Here is a snippet of the logfile of what I am seeing for an account I created for user: samsmith

Regarding permissions for those files mentioned. Here is what I am seeing:

-rw-r----- 1 root root 1237 Apr 29 07:09 /etc/shadow
-rw-r--r-- 1 root root 1963 Apr 29 07:09 /etc/passwd
-rwxr-xr-x 1 root root 275960 Mar 9 18:14 /usr/sbin/gdm-binary

thankyou for your help,

decep
The /etc/shadow file should be owned by root:shadow. Yours is root:root. Also, what's the permissions on just the /etc directory? Can you post the line from /etc/passwd, that has the samsmith user?
 
Old 04-29-2009, 07:45 PM   #6
decepticon
LQ Newbie
 
Registered: Apr 2009
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TB0ne View Post
The /etc/shadow file should be owned by root:shadow. Yours is root:root. Also, what's the permissions on just the /etc directory? Can you post the line from /etc/passwd, that has the samsmith user?
Here Ya go:
[root@localhost /]# less /etc/passwd | grep "samsmith" | more
samsmith:x:502:502:Sam Smith:/home/samsmith:/bin/bash

drwxr-xr-x 103 root root 12288 Apr 29 05:43 etc


This is what I get when trying to chown or chgrp of /etc/shadow

[root@localhost /]# chown shadow /etc/shadow
chown: `shadow': invalid user
[root@localhost /]# chgrp shadow /etc/shadow
chgrp: invalid group `shadow'




thanks again

Last edited by decepticon; 04-29-2009 at 08:02 PM. Reason: adding stuff
 
Old 04-29-2009, 08:13 PM   #7
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
On my CentOS box, shadow is owned root:root - there is no shadow group.

I'm pretty sure I say in a discussion about Ubuntu that a user needed to reboot to use new users. I would imagine that restarting the appropriate service would achieve the same end. Not sure which service though.
 
Old 04-29-2009, 08:14 PM   #8
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Sorry - shadow should only be readable and by root only

Code:
ll /etc/shadow
-r-------- 1 root root 1.8K Jan 14 09:34 /etc/shadow
 
Old 04-30-2009, 09:22 AM   #9
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,325

Rep: Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881
Quote:
Originally Posted by billymayday View Post
Sorry - shadow should only be readable and by root only

Code:
ll /etc/shadow
-r-------- 1 root root 1.8K Jan 14 09:34 /etc/shadow
Huh...interesting. On OpenSuSE 11.1, it's 640, root:shadow. But I did look at one of my RHEL5 boxen, and it's 600, root:root. Go figure.
 
Old 05-02-2009, 12:54 PM   #10
decepticon
LQ Newbie
 
Registered: Apr 2009
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by billymayday View Post
Sorry - shadow should only be readable and by root only

Code:
ll /etc/shadow
-r-------- 1 root root 1.8K Jan 14 09:34 /etc/shadow

I chmod 400 /etc/shadow and still the same problem.
 
Old 05-04-2009, 01:53 AM   #11
decepticon
LQ Newbie
 
Registered: Apr 2009
Posts: 10

Original Poster
Rep: Reputation: 0
okay, I fixed the problem......just disabled LDAP
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Configure Failed logins to lock accounts after 5 failed attempts mccartjd Linux - Newbie 5 05-05-2008 09:02 AM
Authentication Authorization Accounts avijitkdey Linux - Server 1 02-21-2008 06:40 AM
User Accounts Authentication Failing... HELP! nanohead Fedora 5 11-06-2006 09:57 AM
PHP web authentication using system accounts jineshkj Programming 1 04-30-2006 11:53 PM


All times are GMT -5. The time now is 12:35 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration