LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Root Login Problem ... (https://www.linuxquestions.org/questions/linux-security-4/root-login-problem-473655/)

boborano 08-14-2006 02:11 AM

Root Login Problem ...
 
The machine is running on RHEL 4 .. whenever root tries to login as root and password redhat it is showing "Incorrect Username or Password"..and /etc/securetty file is missing ..
I booted the machine in runlevel 3 and edited the /etc/pam.d/login and make the line

auth required pam_securetty.so to
auth optional pam_securetty.so


chked /etc/passwd , /etc/shadow,
/etc/rc.d/rc.sysinit , /etc/inittab, /etc/rc.local
all found ok ..

no file attributes have been set up on these files as #lsattr shows normal listing ..
Pls suggest wht else i shoud chk in order to get rid of these prob..

acid_kewpie 08-14-2006 03:00 AM

it sounds like you've just forgotten the password... have you tried resetting it via booting to runlevel 1?

boborano 08-14-2006 06:27 AM

i tried it too ..but the problem seems to lie on PAM ..
Normally , root can login into a system if /etc/securetty is missing ..in this case /etc/securetty file is missing therefore root should log in to the system ..but it can't .. i even tried to install the rpm setup-2.5.37-1.3 ..but after succesfull installation the file cannot be recreated ..it seems /etc/securetty file cannot be installed by a mere installation of the requisite rpm..

live_dont_exist 08-14-2006 11:24 AM

How about mounting ur root partition off a rescue CD ...or going to Single user...

touch /etc/securetty; echo console > /etc/securetty

Does that work??

Cheers
Arvind

boborano 08-16-2006 12:25 AM

i also tried recreating the /etc/securetty file ... and sets the permission of the file to 644 ...but still it doesn't seems to work ...
With rescue CD ...the prob can be solved ..is there any other method ...without using rescue CD ...to solve the prob ?

live_dont_exist 08-16-2006 12:39 AM

No .. not just recreate... the /etc/securetty file holds a list of all terminals users are allowed to log in from...so if its just a blank file I'mnot sure its any good...so create the file and put in the word "console" in it...log out , reboot whatever n see what happens...

Rescue CD --> Solves all problems ...how?? ... all I was hinting at is to somehow mount your system. It wouldnt matter if you did it through Grub or the Rescue CD.

Keep us posted.
Cheers
Arvind

boborano 08-16-2006 01:48 AM

recreate means i have done all the necessary entries that was supposed to be in the /etc/securetty ...mere installation of the rpm for /etc/securetty would not do ..and above all ..if /etc/securetty file is not there ..root should be able to login ..but if the file is there and blank we must make a necessary changes in /etc./pam.d/login file ..also chked /etc/pam.d/security...still there is some problem persists in the system which i can't find ..


All times are GMT -5. The time now is 09:04 AM.