openvds-clients
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Openvds-clients] webmin users and groups modified....


From: Marcos Rubinstein
Subject: [Openvds-clients] webmin users and groups modified....
Date: Thu, 14 Feb 2002 20:31:11 -0500 (EST)

dirty hack but I hope usefull ;)

the modification to the module will allow you to create/delete the rights
of an user (and see which rights an user has) from the users and groups
webmin module (renamed OpenVds-useradmin).

you can download the module at ftp://test3.alpa.com/OpenVds-useradmin.wbm

notes:

1.- I'm not perl programer!... (actually I'm not a programer at all)

2.- the concept:

2.1.- redhat linux allows comas (,) inside "real name" (or comments)
      in the passwd file... webmin regnize 5 fields inside the "real
      name"if the option "Show office and phone details?" in the
      users and groups (sytem) module configuration is selected.

2.2.- FreeVsd (I'm a little timid to call it OpenVds yet ;) has 8
      settings in /etc/vsd/priv, but i think that 99.9% of my
      clients use only 4 (ftp chrtftp mail telnet), actually mostly
      3 (no telnet).

2.3.- I thought: "why not to use those (mostly) unused 'fields'
      after the real name to control 4 of the rights?... the result
      is the modified module!

2.4.- I did then modified: index.cgi edit_user.cgi save_user.cgi .
      the last one (save_user.cgi) has (at the end) a system call to
      setrights.

3.- Of course would be much nicer if instead of using the "real
    name", we parsed the info from /etc/vsd/priv and that the
    modification of /etc/vsd/priv is done directly locking and
    writing to it through perl instead of using a system call...
    but, as I stated, I'm not perl programer!

4.- If we keep the module the way that it's now, then at least it
    should have a "preprogram" (a command to be run before fetching
    index.cgi) that would uptdate /etc/passwd to be sure to include
    any modifications that had been done to /etc/vsd/priv !... I'm
    working now in a shell script to do that... (another dirty
    system call then for webmin perl modules :(... but.. it's better
    than nothing!!!

5.- of course, remember to restritc the uid/gid numbers that webmin
    would use to create new users to the actual uid/gid for your
    virtual! (I normally add 10 to the first number ;)

6.- modifications, critisisms, ideas and actual code (especially
    this last item) would be appreciated :)))

7.- I'm working too in an "easy" module to create a mail user or new
    mail address to be forwarded to another mail address... but,
    again, because of my limitations with perl, I'm doing it with
    the custom commands... as soon as it's finish I let you know!
    (then... if somebody transforms the two shell scripts to perl
    scripts.. I promess to hack it somehow to make them as a webmin
    module ;)

Cheers! Marcos






reply via email to

[Prev in Thread] Current Thread [Next in Thread]