From owner-freebsd-questions@FreeBSD.ORG Sun Jul 2 18:40:07 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 3FC4F16A407 for ; Sun, 2 Jul 2006 18:40:07 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC52B444AE for ; Sun, 2 Jul 2006 18:40:06 +0000 (GMT) (envelope-from freebsd-questions@m.gmane.org) Received: from root by ciao.gmane.org with local (Exim 4.43) id 1Fx6rS-0003Pj-Cg for freebsd-questions@freebsd.org; Sun, 02 Jul 2006 20:40:02 +0200 Received: from 82-70-166-86.dsl.in-addr.zen.co.uk ([82.70.166.86]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 02 Jul 2006 20:40:02 +0200 Received: from gmane by 82-70-166-86.dsl.in-addr.zen.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 02 Jul 2006 20:40:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: "Steve A" Date: Sun, 2 Jul 2006 19:03:15 +0100 Lines: 34 Message-ID: X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 82-70-166-86.dsl.in-addr.zen.co.uk X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-RFC2646: Format=Flowed; Original Sender: news Subject: 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 18:40:07 -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 :)