From owner-freebsd-questions@FreeBSD.ORG Thu Jul 28 19:15:57 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CEB0D16A41F for ; Thu, 28 Jul 2005 19:15:57 +0000 (GMT) (envelope-from root@pukruppa.de) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4B21243D48 for ; Thu, 28 Jul 2005 19:15:57 +0000 (GMT) (envelope-from root@pukruppa.de) Received: from reverse-213-146-114-24.cust.kamp-dsl.de [213.146.114.24] (helo=reverse-213-146-114-24.cust.kamp-dsl.de) by mrelayeu.kundenserver.de with ESMTP (Nemesis), id 0MKwh2-1DyDrF1iOI-0006rf; Thu, 28 Jul 2005 21:15:53 +0200 Date: Thu, 28 Jul 2005 21:21:11 +0200 (CEST) From: "P.U.Kruppa" X-X-Sender: root@www.pukruppa.net To: "albi@scii.nl" In-Reply-To: <20050728202555.04233dd3.albi@scii.nl> Message-ID: <20050728211720.A48905@www.pukruppa.net> References: <20050728202555.04233dd3.albi@scii.nl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Provags-ID: kundenserver.de abuse@kundenserver.de login:2446dbdf8275641f979193ced594c629 Cc: freebsd-questions@freebsd.org Subject: Re: script for adding a samba-user X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2005 19:15:57 -0000 On Thu, 28 Jul 2005, albi@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@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > ********************************************* * Peter Ulrich Kruppa - Wuppertal - Germany * *********************************************