Add user (Perl) CGI script

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

 



Hello all,

I just wrote a CGI script that allows adding users to Fedora Directory
Server (FDS) very easily. The script is attached to this email. Future
revisions can be downloaded from:

http://lems.kiskeyix.org/toolbox/?f=adduser-ldap.cgi

The license is GPL. So feel free to add it to other projects.

Features:

* Simple to use and to install
* E-Mail is sent to the user that was created (templated) and CC to
another email
* Uses readily available Perl modules: Net::LDAP, CGI, Net::SMTP
* XHTML 1.0 and CSS plus javascript to avoid typing much (fields get
automagically populated as you type)


Installation:

copy cgi script to your cgi-bin dir:

cp adduser-ldap.cgi /var/www/cgi-bin/

make sure it's executable:

chmod ugo+rx /var/www/cgi-bin/adduser-ldap.cgi

create a "secret" file:

echo "password" > /etc/adduser-ldap.secret
chmod 0400 /etc/adduser-ldap.secret
chown apache /etc/adduser-ldap.secret

make sure that the needed Perl modules are installed (hint: perl
adduser-ldap.cgi)

modify the variables on top of the script to taste.

The script assumes that you will be using "admin" as your bind dn:

my $LDAPADMINCN =

  "uid=admin,ou=Administrators,ou=TopologyManagement,o=netscapeRoot";

TLS is supported, but can be easily turned off if you are using it in
the same box as the server is running. (Just comment out the
start_tls() call).

Feel free to post this script to the wiki page. (I couldn't figure out
how to do that ;-))

I made this script to allow creating accounts by non-technical
personnel to the LDAP directory (used by Wildfire Jabber Server).

Everything works like a charm!

Enjoy

-- 
----)(-----
Luis Mondesi
*NIX Guru

Kiskeyix.org

"We think basically you watch television to turn your brain off, and
you work on your computer when you want to turn your brain on" --
Steve Jobs in an interview for MacWorld Magazine 2004-Feb

No .doc: http://www.gnu.org/philosophy/no-word-attachments.es.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: adduser-ldap.cgi.gz
Type: application/x-gzip
Size: 5305 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/389-users/attachments/20061005/02104556/attachment.gz 


[Index of Archives]     [Fedora User Discussion]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora News]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora QA]     [Fedora Triage]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Yosemite Photos]     [Linux Apps]     [Maemo Users]     [Gnome Users]     [KDE Users]     [Fedora Tools]     [Fedora Art]     [Fedora Docs]     [Maemo Users]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Fedora ARM]

  Powered by Linux