script for adding a samba-user

P.U.Kruppa root at pukruppa.de
Thu Jul 28 19:15:57 GMT 2005


On Thu, 28 Jul 2005, albi at scii.nl wrote:

>
> hi,
>
> been working on a script to add a samba-user, below an example which is
> not working, can someone provide the fix here to make it work properly ?
>
> #!/bin/sh
> adduser -G data -s scponly $1
> smbpasswd $1
Assuming you use samba3 something like

echo $PASSWORD | pw useradd $USER_NAME -g $GROUP -s /bin/sh \
       -h fd -c "$REAL_NAME" -m
(echo $PASSWORD; echo $PASSWORD)| smbpasswd -s -a $USER_NAME)

should do.

Regards,

Uli.

>
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
>



*********************************************
* Peter Ulrich Kruppa - Wuppertal - Germany *
*********************************************


More information about the freebsd-questions mailing list