Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie Question: Only root can login? 1

Status
Not open for further replies.

cdhopp

MIS
Mar 12, 2002
3
US
I'm not sure how I ended at this point, but, now, on my Red Hat 7.3 box, I can no longer login as anyone but root. Linux has been configured to automatically start GDM for login, so I'm not sure if the problem is with GDM or XDM. More likely, I think I have something configured wrong in /etc/passwd, /etc/shadow, and/or /usr/sbin/passwd. I've checked ownership of /home/username, so that doesn't seem to be an issue.

Any suggestions?
 
have a look at the logs in /var/log (auth.log, messages or anything else that looks relevent).

if you run 'tail -f auth.log' and then try to log in from the console you might see some clues.

also check to see if you can become a user, so as root type 'su - yourusername'. if this is succesful then there is a problem with the authentication.
 
I cannot find the auth.log file, either at the location you specified or by doing a find. Is there any chance that logging is turned off for this function or that the log file has a different name on Red Hat?

Also, I have tried to su to one of the other users. There is no prompt for password. Here is the session:

[root@redhat home]# cd /var/log
[root@redhat log]# ls
boot.log junkbuster lastlog rpmpkgs squid
boot.log.1 kdm.log maillog rpmpkgs.1 squidGuard
cron ksyms.0 maillog.1 sa wtmp
cron.1 ksyms.1 messages samba xferlog
cups ksyms.2 messages.1 scrollkeeper.log xferlog.1
dmesg ksyms.3 mysqld.log secure XFree86.0.log
fax ksyms.4 mysqld.log.1 secure.1
gdm ksyms.5 news spooler
httpd ksyms.6 pgsql spooler.1
[root@redhat log]# find / -name auth.log -print
find: /proc/4090/fd: No such file or directory
[root@redhat log]# su testuser
su: incorrect password

Thanks for the assistance.
 
don't worry about the auth.log. i'm using debian and it tends to log to many files. your authentication stuff probably gets logged to 'messages'.
it's very strange that you can't su to a user from root tho. try tail -f on messages when you do it to look for clues.
also try creating a new account with 'useradd -m test' and see if you can su to that.

also check the permissions on /etc/passwd and shadow. they should have some kind of read access like -rw-r--r-- and -rw-r-----
 
Couldn't su or login, even after creating user with 'useradd -m test' However, you were correct -- authentication was logged in /var/log/messages. By running a tail -f on messages, I was able to see this:

su: pam_ldap: ldap_simple_bind Can't contact LDAP serv

As you'd expect, I restarted LDAP and, miraculously, logins were restored. I'm not sure when, but I must have shut off LDAP at some point, creating this problem.

I'm happy to say that I was on the right trail on Friday, since it was looking like there was some PAM-related problem. But, I couldn't quite get there. Thanks for the troubleshooting suggestion to pinpoint the exact issue.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top