From owner-freebsd-questions@FreeBSD.ORG Sun Jul 2 20:07:29 2006 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 ADF0416A6C5 for ; Sun, 2 Jul 2006 20:07:29 +0000 (UTC) (envelope-from bsd@bathnetworks.com) Received: from lmail.bathnetworks.co.uk (mail.bathnetworks.com [84.92.24.252]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D08944420 for ; Sun, 2 Jul 2006 19:44:29 +0000 (GMT) (envelope-from bsd@bathnetworks.com) Received: (qmail 18485 invoked by uid 510); 2 Jul 2006 20:53:08 +0100 Received: from 127.0.0.1 by lmail.bathnetworks.co.uk (envelope-from , uid 508) with qmail-scanner-1.24-st-qms (clamdscan: 0.88/1261. spamassassin: 3.0.2. perlscan: 1.24-st-qms. Clear:RC:0(127.0.0.1):SA:0(-4.7/5.0):. Processed in 2.180748 secs); 02 Jul 2006 19:53:08 -0000 X-Spam-Status: No, hits=-4.7 required=5.0 X-Antivirus-MYDOMAIN-Mail-From: bsd@bathnetworks.com via lmail.bathnetworks.co.uk X-Antivirus-MYDOMAIN: 1.24-st-qms (Clear:RC:0(127.0.0.1):SA:0(-4.7/5.0):. Processed in 2.180748 secs Process 18476) Received: from localhost (HELO 192.168.0.50) (bsd@bathnetworks.com@127.0.0.1) by lmail.bathnetworks.co.uk with SMTP; 2 Jul 2006 20:53:06 +0100 Received: from 192.168.0.104 (SquirrelMail authenticated user bsd@bathnetworks.com) by 192.168.0.50 with HTTP; Sun, 2 Jul 2006 20:53:06 +0100 (BST) Message-ID: <62217.192.168.0.104.1151869986.squirrel@192.168.0.50> In-Reply-To: References: Date: Sun, 2 Jul 2006 20:53:06 +0100 (BST) From: bsd@bathnetworks.com To: "Steve A" User-Agent: SquirrelMail/1.4.4 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: freebsd-questions@freebsd.org Subject: Re: FreeBSD add user script syntax 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: Sun, 02 Jul 2006 20:07:29 -0000 > I've got Samba set up as a domain controller successfully, and am now > wanting to user usrmgr.exe and svrmgr.exe to make basic user admin changes > from a Windows workstation. > > Some stuff works, and some stuff doesn't, and I was looking for some help > with the script sections listed here... > > What works: > > add user script = pw user add -n %u -g users -c "Windows User" -s > /usr/bin/nologin > delete user script = pw user del -n %u -r > add group script = pw group add -n %g > add machine script = pw user add -n %u -g winstations -c Windows_Machine > -s > /usr/sbin/nologin > > What doesn't work: > > delete group script = pw group del -n %g > add user to group script = pw group mod -n %g -M %u > set primary group script = pw user mod -n %u -g %g > > What I can't figure out: > > rename user script = > delete user from group script = > > > Does anyone have examples that work that could pinch please? > > Many thanks, > Steve :) > Steve, How did you setup samba? There are several ways to do this. There are very useful guides on the samba site. There are also variuos scripts for adding users etc on the IDEALX site: http://www.idealx.com/content/view/141/146/lang,fr/index.en.html Rob