From owner-freebsd-questions Wed Sep 18 12:28:29 2002 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 DF5F237B401 for ; Wed, 18 Sep 2002 12:28:27 -0700 (PDT) Received: from pgh.nepinc.com (pgh.nepinc.com [66.207.129.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 04B1F43E4A for ; Wed, 18 Sep 2002 12:28:27 -0700 (PDT) (envelope-from jimd@nepinc.com) Received: from jimslaptop.int (jimslaptop.int [192.100.100.107]) by pgh.nepinc.com (8.11.4/8.11.3) with ESMTP id g8IJSPc27474; Wed, 18 Sep 2002 15:28:25 -0400 (EDT) (envelope-from jimd@nepinc.com) Content-Type: text/plain; charset="iso-8859-1" From: Jim Durham Reply-To: jimd@nepinc.com Organization: NEP Supershooters To: Bsd Neophyte , freebsd-questions@FreeBSD.ORG Subject: Re: what is the freebsd version for "useradd -M"? Date: Wed, 18 Sep 2002 15:28:19 -0400 User-Agent: KMail/1.4.2 References: <20020917232551.10809.qmail@web20104.mail.yahoo.com> In-Reply-To: <20020917232551.10809.qmail@web20104.mail.yahoo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200209181528.19794.jimd@nepinc.com> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tuesday 17 September 2002 07:25 pm, Bsd Neophyte wrote: > i'm setting up samba on my FreeBSD box. the goal is to make it a PDC. > > i'm following the directions from "Samba Unleased" by SAMS. > > in the instructions, there's mention that each machine needs to have a > user account on the server. > > it gives the following command to setup a machine account: > > useradd -c "Samba ODC fir MYDOMAIN' -M -s /bin/false -n PERSEUS$ > > now, I don't know what the -M stands for when you add a user. i'm > assuming i need to use "pw useradd". when i try i get an error. > > the man page for pw shows a -M, but it's only used for the groupadd > option. > > i would like to know what i should use instead of the -M. > > any and all help will be appreciated. > 'pw' has different arguments based on the first argument. If you say 'pw useradd' then "-M" is not valid. You'll see this if you carefully read the man page. What I think you want is -g groupname . IE; for group 'staff", it would be 'pw useradd username -g staff -y /dev/null -s /bin/false' . I'm not s= ure=20 this works right with machine accounts, where the last character of the u= ser=20 name is '$'. I've never tried it. I just run 'vipw' and add the line. username$:I:4055:3000::0:0:Machine Foobo:/dev/null:/bin/false Then you run 'smbpasswd -a -m username' . -jim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message