passwd command tips in HPUX

Tips 1: 

If you want to reset a password for a account normally you will use "#passwd" command. But it will ask to retype the password again. If you want to disable that "retype password" option then use the below command,

#echo "password"| passwd userid 

If you use the above command then it wont ask you to enter the password second time. 

Tips 2: 

Whats is the difference between the below 2 command ?

#passwd  userid   and /usr/sbin/passwd userid
 
Answer : 

 If you use the #passwd userid - once u done the password reset using this command, then if you try to change the password again within a day , You will get the message like "Recently you have changed the password, you cant change the password again, try after few days"

But if you use the command  #/usr/sbin/passwd userid - then it will allow you to change the password. This is the difference between direct #passwd command and #/usr/sbin/passwd command. 

/usr/sbin/passwd - means this will give super user power. So it will allow to change the user id ,even if you changed 5 minutes before also.



0 comments:

Post a Comment

Blogger Tips and TricksLatest Tips And TricksBlogger Tricks