1761355 Members
3037 Online
108901 Solutions
New Discussion юеВ

Can't change root passwd

 
Ricky_2
Frequent Advisor

Can't change root passwd

Hi, I always login to my system using the user name "tenkk". Then I su to root. Now when I issue "passwd root" after su-ing to root, I get the messages "Login name "tenkk" does not belong to uid 0. Can't find in the protected databse". Can someone advise me on what's wrong? Thanks.
11 REPLIES 11
U.SivaKumar_2
Honored Contributor

Re: Can't change root passwd

hi,
$su - root
password:
you will get copyright and login messages

#passwd
give the new password now. it is for root.

regards,
U.SivaKumar
Innovations are made when conventions are broken
Niraj Kumar Verma
Trusted Contributor

Re: Can't change root passwd

the reason behind it is that your login name doesn't change try

# logname

to change passwd

# /sbin/passwd root

or if you are using nis

# /sbin/passwd -r nis root

-Niraj
Niraj.Verma@philips.com
Ricky_2
Frequent Advisor

Re: Can't change root passwd

Hi Sivakumar, I'd tried that but it didn't work either.
Victor BERRIDGE
Honored Contributor

Re: Can't change root passwd

Hi,
Since you havent given information on OS nor box type, I would suggest that you have a look at the result of your su - (id cmd), to be sure you are now root and try to modify the passwd with sam, and then give us the result...

Good luck
Victor
U.SivaKumar_2
Honored Contributor

Re: Can't change root passwd

hi,
do try this also.
$su -
password:
#passwd
give the new password now for root.
#login root
password:
give the new password .
can you login ?
regards,
U.SivaKumar
Innovations are made when conventions are broken
Niraj Kumar Verma
Trusted Contributor

Re: Can't change root passwd

Hi,

I agree with Victor !!
can you provide the enough info. is your system is a trusted system???

try checking the passowrd file

# pwck -s
Niraj.Verma@philips.com
John Carr_2
Honored Contributor

Re: Can't change root passwd

Hi

try this

telnet localhost

login root

passwd

John.
Peter Kloetgen
Esteemed Contributor

Re: Can't change root passwd

Hi Ricky,

are you sure you used the su-command with minus? Only if you do so, you don't only switch identity but also user environment. So take care, that you use:

su - root

instead of

su root

If this doesn't work, try:

telnet localhost

on your host and login as root.

Allways stay on the bright side of life!

Peter
I'm learning here as well as helping
David Burgess
Esteemed Contributor

Re: Can't change root passwd

Try

su -

to su to root. This will read roots .profile and set the environemt to roots

HTH

Dave.