Annotation of loncom/lcuseradd, revision 1.2

1.1       harris41    1: #!/usr/bin/perl
                      2: #
                      3: # lcuseradd
                      4: #
                      5: # Scott Harrison
                      6: # October 27, 2000
                      7: 
                      8: use strict;
                      9: 
                     10: # This script is a setuid script that should
                     11: # be run by user 'www'.  It creates a /home/USERNAME directory
                     12: # as well as a /home/USERNAME/public_html directory.
                     13: # It adds user entries to
                     14: # /etc/passwd and /etc/groups.
1.2     ! harris41   15: # Passwords are set with lcpasswd.
        !            16: # www becomes a member of this user group.
1.1       harris41   17: 
                     18: # Standard input usage
                     19: # First line is USERNAME
                     20: # Second line is PASSWORD
                     21: 
                     22: # Command-line arguments [USERNAME] [PASSWORD]
                     23: # Yes, but be very careful here (don't pass shell commands)
                     24: # and this is only supported to allow perl-system calls.
                     25: 
                     26: # Security
                     27: $ENV{'PATH'}=""; # Nullify path information.
                     28: $ENV{'BASH_ENV'}=""; # Nullify shell environment information.
1.2     ! harris41   29: 
        !            30: # Add user entry to /etc/passwd and /etc/groups.
        !            31: 
        !            32: # Set password with lcpasswd (which creates smbpasswd entry).
        !            33: 
        !            34: # www becomes member of this user group
1.1       harris41   35: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>