LinuxSA Mailing list archives
Index:
[thread]
[date]
[subject]
[author]
From: Rick Marshall <rjm@herzfeld.com.au>
To : Darryl Ross <darryl@bachblue.com.au>
Date: Mon, 15 Mar 1999 15:03:50 +1100
Re: /etc/passwd
Darryl Ross wrote:
> Hey All,
>
> I'm in the planning stages of writing a C program that I am going to set up
> as a CGI script and set it up so that I can add, delete and modify users on
> my RH5.2 system using a web interface and forms. As I see it, I have two
> options for doing this. Getting my program to directly open the /etc/passwd
> file and make the modifications, or get my program to call the useradd,
> userdel or usermod programs as required and pass the arguments to that to
> make the changes.
>
> My problem with the first option is that I have no idea how the passwords
> are stored in the file, i.e. the "encryption" algorithm. I heard its not too
> strong. Is there somewhere I can read up so I can find out more about it? I
> don't really like this option though anyway, cos if my program stuffs up,
> then it might lose all the user information on the system. Anyone know where
> I can get info for finding this out? I know there are programs that do what
> I want, but I want the satisfaction of making it myself :)
>
> I might write a program and see if I can get it working with the second
> option to start with, and then see how I go. Would anyone be interested in
> the program if I can get it working??
>
> Cheers
> Dazz
>
> --
>
> #include <stdio.h>
> int main(void) {
> printf("Darryl Ross\n");
> printf("Technical Manager\n");
> printf("Bachblue Pty Ltd\n");
> printf("darryl@bachblue.com.au\n\n");
> return 0;
> }
>
start with man getpwent. You should be able to work it from there. These are
portable routines and the only safe way to do things.
Rick
>
> --
> Check out the LinuxSA web pages at http://www.linuxsa.org.au/
> To unsubscribe from the LinuxSA list:
> mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject
--
mailto:rjm@herzfeld.com.au <=> RICK MARSHALL <=> http://www.herzfeld.com/isl
International Software Laboratories Pty Limited - Australia, New Zealand
Footwear: Retail Management, Point of Sale, Wholesale, Manufacturing
(-: All in Linux :-) (-: On the Web :-) (-: All in UNIBASE 5GL :-)
--
Check out the LinuxSA web pages at http://www.linuxsa.org.au/
To unsubscribe from the LinuxSA list:
mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject
Index:
[thread]
[date]
[subject]
[author]
Return to the LinuxSA Mailing List Information Page