i mean how i can think about that

It was all thought previously, and Fletch already gave you a link to follow.

Get a copy of webmin and see how that software does the task you describe; all the details are there.

The procedures to add or delete users from the system differ greatly with the underlying OS and the specific configuration of the host on which to perform these tasks. As Fletch wrote, there are different schemes: passwd and shadow files, LDAP, NIS, NIS+, PAM, differing system utilities that take care of user's home directories, skeleton files used to set up acounts and so on.

If you want to write your own CGI to handle all that, go ahead, but look at webmin as a reference and starting point. Be aware that any process which modifies security tokens must run under UID 0, i.e. as root, which generally isn't the case with apache, so you need suexec...

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

In reply to Re^3: helping in CGI script that add users to system by shmem
in thread helping in CGI script that add users to system by adam_blackice

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.