I m playing with /etc/passwd in my C program.
I want to change a user password. are there a standard linux functions that do a such functions ?
I m playing with /etc/passwd in my C program.
I want to change a user password. are there a standard linux functions that do a such functions ?
system("passwd <parameters>");
*pwent()
function family and also putpwent().The question is possibly a duplicate.
Linux stores the password in the /etc/shadow
file. The second column (delimited by :
character) in this file against the user name shows the hashed password.
It's best advised to not touch this file and cause harm. If you must, you can use the vipw
utility for editing