Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Sep 2002 15:28:19 -0400
From:      Jim Durham <jimd@nepinc.com>
To:        Bsd Neophyte <bsdneophyte@yahoo.com>, freebsd-questions@FreeBSD.ORG
Subject:   Re: what is the freebsd version for "useradd -M"?
Message-ID:  <200209181528.19794.jimd@nepinc.com>
In-Reply-To: <20020917232551.10809.qmail@web20104.mail.yahoo.com>
References:  <20020917232551.10809.qmail@web20104.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209181528.19794.jimd>