Here's what I did, maybe it'll be helpful
NOTE: this sets the password to x, so that it can be set later in the shadow file. if you're not using a shadow file, use the crypt() function, it has a man page, or reply and I can tell you how to use it.
int addUser(char* username, int uid, int gid...
I'm writing a program that modifies the /etc/shadow file directly, but I can't figure out how to generate md5 passwords. Does anyone have any experience in this?
Thanks,
Chad
I have 2 questions actually... Does anyone know an easy way to create a random salt for encrypting passwords, and, does anyone know what function/library etc. shadow passwords are created with?
Thanks
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.