cancel
Showing results for 
Search instead for 
Did you mean: 

Need to change passwd.

SOLVED
Go to solution
mrk_1
Frequent Advisor

Need to change passwd.

Hi,

I want to change one user passwd. So, I login as a root and tried to change the passwd.
After issue the command "passwd user1" , Its asking old passwd. But I dont know the old passwd.
I found below command for this case.

passwd -r file user1

May I know whats mean file in above command?
Could any one tell how to see the passwd of one user account? I can't see paswd in /etc/passwd as its encrypted one.
12 REPLIES
SKR_1
Trusted Contributor

Re: Need to change passwd.

Try

/usr/lbin/modprpw -x username

If you r doing from root login then it will not ask you the old password of the user.

Thanks

SKR
Prashanth Waugh
Esteemed Contributor

Re: Need to change passwd.

HiRamkumar,
First

You can check ur system is in trusted mode or not by using
#cat /etc/passwd | awk -F: '{print $2}'

the output of the above command will be * only.

Regards
Atul
For success, attitude is equally as important as ability
Prashanth Waugh
Esteemed Contributor

Re: Need to change passwd.

Hi Ramkumar,

If your system in trusted mode then and then only u can change the passwd by using below command
#/usr/lbin/modprpw -x username

Regards
Atul
For success, attitude is equally as important as ability
F Verschuren
Esteemed Contributor

Re: Need to change passwd.

if you have logged in as root you can use the /sbin/passwd to change the passwd, it wil not ask for the old passwd.

if it does you can remove the encripted string form
/etc/shadow
or
/etc/passwd
or
/tcb/files/auth/*/[username]
after removing the string whe user does not have a passwd anny more and you are able to set the passed.
mrk_1
Frequent Advisor

Re: Need to change passwd.

Thank you SKR & Athulkumar.

Athulkuamr, I cheked /etc/passwd file,Its showing some * and other also.

kegrU4amxxxxx
*
*
*
*
ipcMk1wxxxxxx.

For this case, Can I use below command ?
/usr/lbin/modprpw -x username (Does "x" mean password)


Thanks.
Prashanth Waugh
Esteemed Contributor

Re: Need to change passwd.

Hi,

x is the switch.

U can use the command which i have suggested.U can check the manpages for modprpw. Check regarding x switch.

Regards
Atul
For success, attitude is equally as important as ability
Prashanth Waugh
Esteemed Contributor

Re: Need to change passwd.

Hi Ramkumar,

You got the point.ur problem solved or not

Regards
Atul
For success, attitude is equally as important as ability
mrk_1
Frequent Advisor

Re: Need to change passwd.

Hi

Athul, Once I issue the command, its showing System is not trusted. am not able to change it.

Verschuren, Not able to see the /etc/shadow file, But I can change passwd in file /etc/passwd. Its fine now.

Thank a lot Athul and Verschuren.

Need to know more information,
1.How to see the passwd of one user?
2.passwd -r file user1 (what does mean file)
3.Is any other command there to change the passwd?

Thank
Prashanth Waugh
Esteemed Contributor

Re: Need to change passwd.

Hi Ramkumar,

Pls assign the point as per itrc forum.People spending their valuable time for answering.So assign the points and keep in touch with itrc .

Regards
Atul
For success, attitude is equally as important as ability
Deepak Kr
Respected Contributor
Solution

Re: Need to change passwd.

Hi Ram,

long discussion is already goin on here..

>>>
Need to know more information,
1.How to see the passwd of one user?
2.passwd -r file user1 (what does mean file)
3.Is any other command there to change the passwd?

>>>>

see urs is not a trusted system so commands like modprpw will not be helpful for you.

It is not possible for root to see password of any user. Only user can tell who actually set it...

If you really want to reset the password for a user then easy way is to use SAM.

Go to user and group management and select user name and choose reset password from action menu...

Another one is from command line:

## passwd
new password: *****
confirm password:*****

thats it!!


For your another query:::

what is passwd -r file user1 ???

refer to man passwd for complete details!!

I hope this will answer all your queries!!


Deepak

"There is always some scope for improvement"
Deepak Kr
Respected Contributor

Re: Need to change passwd.

See man page:

http://unixhelp.ed.ac.uk/CGI/man-cgi?passwd+1

-r, --repository REPOSITORY
change password in REPOSITORY repository

"There is always some scope for improvement"
mrk_1
Frequent Advisor

Re: Need to change passwd.

Thank you kumar deepak. you have cleared my doubts.
Thank you all to spend valuable time for answering my queries.