--- loncom/Attic/lcuseradd 2000/10/27 23:42:33 1.1 +++ loncom/Attic/lcuseradd 2000/10/29 22:20:43 1.3 @@ -12,13 +12,15 @@ use strict; # as well as a /home/USERNAME/public_html directory. # It adds user entries to # /etc/passwd and /etc/groups. -# Passwords are set with lcpasswd +# Passwords are set with lcpasswd. +# www becomes a member of this user group. # Standard input usage # First line is USERNAME # Second line is PASSWORD +# Third line is PASSWORD -# Command-line arguments [USERNAME] [PASSWORD] +# Command-line arguments [USERNAME] [PASSWORD] [PASSWORD] # Yes, but be very careful here (don't pass shell commands) # and this is only supported to allow perl-system calls. @@ -26,3 +28,15 @@ use strict; $ENV{'PATH'}=""; # Nullify path information. $ENV{'BASH_ENV'}=""; # Nullify shell environment information. +# Add user entry to /etc/passwd and /etc/groups in such +# a way that www is a member of the user-specific group + +# useradd [-c comment] [-d home_dir] +# [-e expire_date] [-f inactive_time] +# [-g initial_group] [-G group[,...]] +# [-m [-k skeleton_dir] | -M] [-p passwd] +# [-s shell] [-u uid [ -o]] [-n] [-r] login +system('/usr/sbin/useradd','-c','LON-CAPA user','-G','www','junk'); + +# Set password with lcpasswd (which creates smbpasswd entry). +