-5

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 ?

MOHAMED
  • 41,599
  • 58
  • 163
  • 268

2 Answers2

0

The question is possibly a duplicate.

Community
  • 1
  • 1
hidefromkgb
  • 5,834
  • 1
  • 13
  • 44
0

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

Runcy Oommen
  • 484
  • 2
  • 12