LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   login prompt - can only login as root (https://www.linuxquestions.org/questions/linux-newbie-8/login-prompt-can-only-login-as-root-225617/)

mindfriction 09-02-2004 05:32 AM

login prompt - can only login as root
 
Hi guys and girls,

I clicked the "Has this been asked" button above and found a few threads, even Googled with no real solution to this. So I thought I would make this post, apologies if it has been answered and I've missed it.

OK, well recently I installed RedHat Advanced Server, everything went pretty smooth, didnt even have to configure my internet connection. I created 1 user 'richard' (for myself), and this user could login with no problems. Anyway the drama started to unravel itself when I went to try and install Java 1.4.2. Had no problems installing the binary itself but then I found when I installed Eclipse I was getting complaints that I had wrong java version (java -version diaplyed 1.3). I asked a friend and he said I probably hadn't added it to my PATH in the bashrc file, and along the way he even suggested I configure my sudoers file so I could run commands in root without having to be logged in as root.

Anyway to cut a long story short I added richard to the user specifcation in the etc/sudoers....
Code:

root, richard ALL=(ALL) ALL
And then went to etc/bashrc (which I later find out was the wrong bashrc to got to), opened it up got scared and closed it...

Getting frustrated I Shutdown my computer and go to login as richard as per usual at the GUI login. All seems fine, GNOME is just about to start then the screen flashes and Im back at the login screen. So I try to login as root, and it works. I then su richard, and sure enough user richard cant even run commands..

Whats going on?

Thanks in advance

Oliv' 09-02-2004 09:46 AM

Hi,

log as root, and have a look in /etc directory to see if you have a file called nologin. If yes delete it and try to log as normal user ;)

Oliv'

mindfriction 09-02-2004 12:48 PM

Hi Oliv :) thanks for replying..

Im already logged in as root, its the only way I can post this message right now. Anyway I checked /etc and there's no "nologin" file. I even used GNOMES file search and didnt find it, the only place one exists is in /sbin
Any other ideas?

Thanks again

btmiller 09-02-2004 05:56 PM

Mindfriction, what kind of errors do you get when you try to login as 'richard'? Do the system log files say anything about authentication failures (check /var/log/messages and /var/log/secure).

mindfriction 09-02-2004 10:42 PM

Hi btmiller, thankyou for your reply.

I checked the var/log/message and this is what I have after trying to login as 'richard' first then finally successfully logging in as 'root'
Code:

Sep  3 13:35:08 localhost gdm(pam_unix)[1335]: session opened for user richard by (uid=0)
Sep  3 13:35:09 localhost gdm(pam_unix)[1335]: session closed for user richard
Sep  3 13:35:21 localhost gdm(pam_unix)[1335]: session opened for user root by (uid=0)
Sep  3 13:35:25 localhost gnome-name-server[2663]: starting
Sep  3 13:35:26 localhost gnome-name-server[2663]: name server starting
Sep  3 13:35:26 localhost gnome-name-server[2667]: starting
Sep  3 13:35:26 localhost gnome-name-server[2667]: name server was running on display, exiting
Sep  3 13:35:26 localhost gconfd (root-2673): starting (version 1.0.4), pid 2673 user 'root'
Sep  3 13:35:26 localhost gconfd (root-2673): Successfully registered `OAFIID:gconfd:19991118'
Sep  3 13:35:28 localhost xinetd[2685]: warning: can't get client address: Transport endpoint is not connected

And var/log/secure
Code:

Sep  3 13:35:28 localhost xinetd[1093]: START: sgi_fam pid=2685 from=0.0.0.0

Im not sure how to read these for errors :(

mindfriction 09-03-2004 12:13 AM

Hi again,

I just thought i should just add that this aftrenoon out of curiostiy i created a new user and I can login in as my new user with no problems. Weird. I guess Ive mucked up something for user 'richard' somewhere, and I would sure like to find out so I dont do it again :(

Oliv' 09-03-2004 07:14 AM

Hi,

you can have a look at /etc/passwd to see what kind of shell user "Richard" exec when you login... In theory that's /bin/bash or /bin/sh... If that's something else like /bin/false, that's come from that ;) anyelse no idea :confused:


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