[Sunhelp] useradd ...

Alberto Rivas arivas at unica.edu.ni
Thu Jul 22 12:30:24 CDT 1999


Hmm, i think i can do something better, take a look of this script:

if [ $# -lt 2 ]
then
   echo La sintaxis es: auser username '"Full name"'
 else
      echo ====================================================
      echo Espere un momento, creando usuario ...
      echo ====================================================
      useradd -d /export/u2/taller/$1 -g 20 -m -s /bin/ksh -c "$2" $1
      chown $1 /export/u2/taller/$1
      chmod 700 /export/u2/taller/$1
      echo
      echo ----------------------------------------
      echo Introduzca ahora el password del usuario
      echo ----------------------------------------
      echo
      passwd $1
      echo
      echo ------------------------------------------------------
      echo Proceso finalizado, la cuenta esta creada... Gracias.
      echo ------------------------------------------------------
 #   fi
fi                                      


This script must be placed in the directory /bin and the permission 700 and
then all you must do is to use vi and change the group (-g), the shell
(/bin/ksh) and the homedirectory (/export/u2/taller/$1).

If you have any question, please let me know.

Regards



At 12:30 PM 22/07/99 -0400, you wrote:
>Good day,
>
>What is the exact syntax for useradd?
>
>Can you give me an precise ecample?
>
>Regards,
>
>
>                     ////
>                    (o o)
>  ==============oOOo=(_)=oOOo==============
>          Jean-Marc Beaudoin, T.P.
>            V.I.P. ExcelNet Inc.
>    	  http://www.vipxlnet.com
>	  jmbeaudoin at vipxlnet.com
>	      ICQ# 44484144
>  -----------------------------------------
>
>
>_______________________________________________
>SunHELP maillist  -  SunHELP at sunhelp.org
>http://www.sunhelp.org/mailman/listinfo/sunhelp
>
>



   
 ================================================  	
	Jorge Alberto Rivas
	Administrador Nodo Internet
	Universidad Catolica "Redemptoris Mater"
	UNICA
	Tel:(505)276-0004 ext 137
	Fax:(505)276-0590
	Apartado Postal:  6095
	E-mail: arivas at unica.edu.ni
	http://www.unica.edu.ni/~arivas
==============================End of Message=====







More information about the SunHELP mailing list