LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   changing a users pwd (https://www.linuxquestions.org/questions/linux-newbie-8/changing-a-users-pwd-380824/)

ALInux 11-07-2005 12:41 PM

changing a users pwd
 
hey Iam creating a php script to change a users password....thus I need a non interactive command to change a users password....

I tried: # passwd username
but it prompts me for the password
I want a command that does not prompt me ...something like useradd username
I know that there is a -p argument in useradd .... but I was told that I can only submit the encrypted password with that argument is that true ??

Mad Scientist 11-07-2005 12:44 PM

No, you should be able to pass plain text passwords. I would user "usermod" if you are just changing the password of an already existing user.


All times are GMT -5. The time now is 06:54 AM.