in reply to Re^3: cgi script error
in thread cgi script error

thanx mr. F00li5h i mean mr. intelligent :)
i will tell you what i understood from u .....
first: i will make a table or something by using Mysql and add the different user records like UID and Password .....
and then use adatabase DBI connection or something? ....to connect between DB and my script but what will make the connection between the DB and the system like adding the new account to the /etc/passwd....,
or you mean that i will using the DB to just call the password root from there
forgive me for my dummy questions but iam really needing your help

Replies are listed 'Best First'.
Re^5: cgi script error
by f00li5h (Chaplain) on Apr 10, 2007 at 01:21 UTC

    mr. intelligent :)
    Oh, you. *blush*

    You sound like you kinda get it, but kinda don't, so i've prepared a lovely diagram. (sorry to those monks using a screen reader)

            ___          
           (___)
     mysql |   | --> your daemon --> useradd
           |   |    (as root)   
            ---
             ^
             |
         CGI scripts
        run by Apache
    (as nobody, apache or httpd)
    

    The reason you want it to be so convoluted is because of user permissions. The CGI scripts must run as the least privileged user (cause you cant trust the internet) and you must run the useradd stuff as root. (ofcourse you need to authenticate users on the CGI script so randoms can't just add their own user)

    Another solution might be to use some sort of directory and PAM authentication. You can add users to an LDAP directory as any user that has permissions on the directory ... (but that has many overheads)

    @_=qw; ask f00li5h to appear and remain for a moment of pretend better than a lifetime;;s;;@_[map hex,split'',B204316D8C2A4516DE];;y/05/os/&print;