1837984 Members
2825 Online
110124 Solutions
New Discussion

Re: su to root

 
Nobody's Hero
Valued Contributor

su to root

When I log in as myself and su - to root, it will not acept the passwd. Ever seen this before? I havn't. Cap lock off, I know the password is correct. Any ideas how I can hack the root passwd. Kind of an emergency.

Not sure why su to root isn't aaccpeting the password.
UNIX IS GOOD
13 REPLIES 13
Kurt Beyers.
Honored Contributor

Re: su to root

Robert,

You'll have to boot into single user mode to change the root password if you have forgotten it. You just can define then a new password with the 'passwd' command.

best regards,
Kurt
Nobody's Hero
Valued Contributor

Re: su to root

Kurt thanks,

I am at home and can't get to the console. Any other method? Kinda of in a bind. If not, I guess I'll take the 1 hr drive back into work....
UNIX IS GOOD
Kurt Beyers.
Honored Contributor

Re: su to root

Robert,

There is no other method that I know of to change the root password.

Did you try already a ssh connection? Maybe you can log on as root directly now.

Kurt
Nobody's Hero
Valued Contributor

Re: su to root

Yea, I tried rlogin. Box is as secure as can be. no ftp, rexec, rlogin etc..
UNIX IS GOOD
Alan Meyer_4
Respected Contributor

Re: su to root

you said you were at home... are you on a laptop? Sometimes I get the "NUM" lock on my laptop and that affects the UIO, JKL & M<> keys and has caused me to enter an invalid password on more than one ocassion.
" I may not be certified, but I am certifiable... "
Alan Meyer_4
Respected Contributor

Re: su to root

Well, then there's always the passwd cracker...
" I may not be certified, but I am certifiable... "
Rick Garland
Honored Contributor

Re: su to root

Is this a trusted system? Too many logins have the account locked?

If so, will need to login on console. No need to boot into single user mode, root login on console will work.
Nobody's Hero
Valued Contributor

Re: su to root

Cracker is not an option.

Non trusted system.

I'll take the drive in and boot to s1.

10x anyway

RPM
UNIX IS GOOD
Muthukumar_5
Honored Contributor

Re: su to root

May be /etc/passwd file got corrupted? Only way is to boot with single user mode and try it out if you don't have an option for r* commands.

Did you try with telnet to login from local machine itself. what it is saying during login?

check with tail -f /var/adm/syslog/syslog.log from your user itself.

hth.
Easy to suggest when don't know about the problem!
Ronaldinho
Advisor

Re: su to root

Can you login with any other user?
Try telneting to another machine from that user and rlogin back to your machine. Why do you need to su to root can you login directly as root?

Alan Meyer_4
Respected Contributor

Re: su to root

Robert, did you try to log in with the old password before you went to s1??? Just curious...
" I may not be certified, but I am certifiable... "
Devesh Pant_1
Esteemed Contributor

Re: su to root

Robert,
you should be able to get to the GSP/MP even though you are remote. Normally I don't have to drive in since GSP/MP provides all the access required for shutdown/powerup.

Anyways, please do let us know what did you find out.

thanks
DP
generic_1
Respected Contributor

Re: su to root

Next time this happend restore a the trusted file or password file with the password you know from your backup system :). This is the most common way I know that most people dont think of. You could even restore an edited version of the file hint hint if you completetly forgot.
/etc/passwd
or of trusted
/tcb/files/auth/r/root
Boom your fixed. :).


If you have any handydandy batch scheduler that can launch things as root. Schedule a /usr/lbin/modprpw -k root or a /usr/lbin/modprpw -v root to fix expired
you can use the usermod sam command to set a new password by specifying an encrypted password that you know :)
Also setting up your GSP on the lan would be good. You can not only reboot the system, but if root's account would become locked you could still gain access there if you knew the password without having to drive in

You may want to consider adding sudo you your system

with that you could gain access to your acccount then set your account a as privledge to sudo to root
by using your password instead of roots.
Between this and the GSP you should not have to drive in again uless you get a major case of Fatfinger ehhehe. :).


Hope this helps for the next time.