Results 1 to 9 of 9

Thread: Creating User Accounts from a Webform

  1. #1

    Default Creating User Accounts from a Webform

    Looking for direction, ideas suggestions, help etc.

    SuSE 11
    Perl (happy with perl)i see far too many people trying to exploit php vunrebilities in my apache log files!
    Apache2
    Bash
    html

    Running perl cgi scripts from a basic auth protected directory is not a problem. Running perl cgi scripts isn't a problem either.

    What i'm wanting to do is create a Webform that will allow me to create new users on the system and then create additional files and directories at the same time then create a vhost entry for apache2 and restart apache2.

    I reckon i can do most of these but how can i create a new user on the system from a webform? I guess i need to pull in the use of a bash script as root, but how.

    Help appreciated.

  2. #2
    ab@novell.com NNTP User

    Default Re: Creating User Accounts from a Webform

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Depends on which backend language you have to receive the POST'd data
    from the web form. For example posting to a web server that has PHP
    there would allow you to (VERY CAREFULLY and with LOTS OF CHECKS) call
    the 'useradd' command directly with the username and then the passwd
    command with the desired password (if applicable). PHP has the 'exec'
    and 'system' commands for this, as I recall. Other languages have other
    calls, but keep in mind that these only run with the privileges of the
    web server which should never be 'root' (Apache uses 'wwwrun' as I recall).

    Good luck.





    akwe-xavante wrote:
    | Looking for direction, ideas suggestions, help etc.
    |
    | SuSE 11
    | Perl (happy with perl)i see far too many people trying to exploit php
    | vunrebilities in my apache log files!
    | Apache2
    | Bash
    | html
    |
    | Running perl cgi scripts from a basic auth protected directory is not a
    | problem. Running perl cgi scripts isn't a problem either.
    |
    | What i'm wanting to do is create a Webform that will allow me to create
    | new users on the system and then create additional files and directories
    | at the same time then create a vhost entry for apache2 and restart
    | apache2.
    |
    | I reckon i can do most of these but how can i create a new user on the
    | system from a webform? I guess i need to pull in the use of a bash
    | script as root, but how.
    |
    | Help appreciated.
    |
    |
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.2 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    iD8DBQFIe8kQ3s42bA80+9kRAtZzAJ484WiTSc/z6FSKclhzgixgmREGbQCfWBq2
    niuvHuSE5kHiTxhoADFBfOg=
    =7Qk3
    -----END PGP SIGNATURE-----

  3. #3
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,670
    Blog Entries
    15

    Default Re: Creating User Accounts from a Webform

    On Mon, 14 Jul 2008 21:36:03 GMT
    akwe-xavante <akwe-xavante@no-mx.forums.opensuse.org> wrote:

    >
    > Looking for direction, ideas suggestions, help etc.
    >
    > SuSE 11
    > Perl (happy with perl)i see far too many people trying to exploit php
    > vunrebilities in my apache log files!
    > Apache2
    > Bash
    > html
    >
    > Running perl cgi scripts from a basic auth protected directory is not
    > a problem. Running perl cgi scripts isn't a problem either.
    >
    > What i'm wanting to do is create a Webform that will allow me to
    > create new users on the system and then create additional files and
    > directories at the same time then create a vhost entry for apache2
    > and restart apache2.
    >
    > I reckon i can do most of these but how can i create a new user on the
    > system from a webform? I guess i need to pull in the use of a bash
    > script as root, but how.
    >
    > Help appreciated.
    >
    >

    Hi
    Why not use webmin, can do everything from there?
    http://www.webmin.com/

    --
    Cheers Malcolm (Linux Counter #276890)
    SLED 10 SP2 i586 Kernel 2.6.16.60-0.23-default
    up 22:23, 2 users, load average: 0.14, 0.55, 0.59
    GPU GeForce Go 6600 TE/6200 TE Version: 173.14.09


  4. #4

    Default Re: Creating User Accounts from a Webform

    Thank you those who have replied already, thank you.

    Webadmin.....not what i'm looking for, too complex and and does far more than i want it to do too.

    I want to be able to log into a hidden basic auth protected directory from anywhere and enter details into a webform to create a new user on the system.

    I am wanting a script that will allow me to create a new user account and automatically create custom user files and directories inc user ownership and permissions etc for ftp access for that new account and add entries into the vhost config file for apache2.

    I can do all but create a new user account and i wish to explore how best to do this using a webform, perl and or a bash script.

    The form will require New User info to include a UserName and a PassWord (PassWord twice) and a UserName and PassWord from me too to give root access on the system. Other options will include whether i am giving and allowing a cgi-bin, the use of perl, php and so on.

    Is there a SuSE 11 command line to create a new user on the system?

  5. #5
    Join Date
    Jun 2008
    Location
    Germany
    Posts
    301

    Default Re: Creating User Accounts from a Webform

    Hi,

    maybe you are looking for something like syscp.

    Hope this helps

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,670
    Blog Entries
    15

    Default Re: Creating User Accounts from a Webform

    On Tue, 15 Jul 2008 16:26:03 GMT
    akwe-xavante <akwe-xavante@no-mx.forums.opensuse.org> wrote:

    >
    > Thank you those who have replied already, thank you.
    >
    > Webadmin.....not what i'm looking for, too complex and and does far
    > more than i want it to do too.
    >
    > I want to be able to log into a hidden basic auth protected directory
    > from anywhere and enter details into a webform to create a new user on
    > the system.
    >
    > I am wanting a script that will allow me to create a new user account
    > and automatically create custom user files and directories inc user
    > ownership and permissions etc for ftp access for that new account and
    > add entries into the vhost config file for apache2.
    >
    > I can do all but create a new user account and i wish to explore how
    > best to do this using a webform, perl and or a bash script.
    >
    > The form will require New User info to include a UserName and a
    > PassWord (PassWord twice) and a UserName and PassWord from me too to
    > give root access on the system. Other options will include whether i
    > am giving and allowing a cgi-bin, the use of perl, php and so on.
    >
    > Is there a SuSE 11 command line to create a new user on the system?
    >
    >

    Hi
    useradd, groupadd, passwd, chown and chmod are the cli commands. I'm
    sure there will be a cpan module for this as well.

    --
    Cheers Malcolm (Linux Counter #276890)
    SLED 10 SP2 i586 Kernel 2.6.16.60-0.23-default
    up 1 day 14:26, 2 users, load average: 0.19, 1.06, 1.03
    GPU GeForce Go 6600 TE/6200 TE Version: 173.14.09


  7. #7

    Default Re: Creating User Accounts from a Webform

    Thank you but no.

    same as above, i want to create a webform and write my own scripts.

    I want to learn how to do things rather than use somebody elses product.

    I want a form to enter:

    Domain Name of website
    New Account email address
    New Account UserName
    New Account PassWord1
    New Account PassWord2

    Administration UserName
    Administration PassWord1
    Administration PassWord2
    Cgi-bin yes/no
    perl yes/no
    php yes/no
    Ssh access yes/no

    and so on....

    Click on a submit button and a script will do everything else for me.....i hope!

    This is simplistic as there will be two or more error checking processes built in and a number of emails sent and a summary printed to screen for printing etc and anything else i may think of along the way plus any sugestions made here.

    I am beginning to think i'm in the wrong place for this one, i was hoping for help from someone with expertise with SuSE. Maybe i need help from some other forum specifically for perl and bash scripting on a system level.

  8. #8

    Default Re: Creating User Accounts from a Webform

    Thank you Malcolm, this is more like it i'll look into these later and explore these commands to see what they can give me.

    Thank you.

  9. #9
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,670
    Blog Entries
    15

    Default Re: Creating User Accounts from a Webform

    On Tue, 15 Jul 2008 17:26:04 GMT
    akwe-xavante <akwe-xavante@no-mx.forums.opensuse.org> wrote:

    >
    > Thank you Malcolm, this is more like it i'll look into these later and
    > explore these commands to see what they can give me.
    >
    > Thank you.
    >
    >

    Hi
    You may also like to explore Usenet for additional perl and bash
    scripting assistance. I would also look at the webmin source code for
    ideas.

    Have a look in /etc/ for how user profiles are added when you add a
    user for there shells.

    --
    Cheers Malcolm (Linux Counter #276890)
    SLED 10 SP2 i586 Kernel 2.6.16.60-0.23-default
    up 1 day 15:06, 2 users, load average: 0.16, 0.18, 0.27
    GPU GeForce Go 6600 TE/6200 TE Version: 173.14.09


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •