1832833 Members
2979 Online
110047 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.
Mark Greene_1
Honored Contributor

Re: Can't change root passwd

if none of the above work, you ought to be able to login directly as root from the console and then change the password.

HTH
mark
the future will be a lot like now, only later
pap
Respected Contributor

Re: Can't change root passwd

I think you have trusted system.
Just login as your user name and su to root.
now edit the file /tcb/files/auth/r/root

remove the encrypted password string from it.

now try to change the password using command passwd. You can change it.

Thanks,

-pap
"Winners don't do different things , they do things differently"