On Tue, Sep 17, 2002 at 04:25:51PM -0700, Bsd Neophyte wrote:

> useradd -c "Samba ODC fir MYDOMAIN' -M -s /bin/false -n PERSEUS$

That's the Linux useradd command: you can see the man page at
http://www.freebsd.org/cgi/man.cgi?query=useradd&apropos=0&sektion=0&manpath=Red+Hat+Linux%2Fi386+7.3&format=html

The flags mean:

    -c "Samba ODC for MYDOMAIN"      Real (GCOS) name for account

    -M                               Don't create home dir for account,
                                     even if default is to do so.

    -s /bin/false                    Use /bin/false as shell

    -n                               Add group of same name as user to
                                     be default group for account

    PERSEUS$                         Username for account.

As I remember, the trailing $ sign is significant for Samba when acting
as a domain controller.

In the BSD idiom, the equivalent would be something like:

    pw useradd -n 'PERSEUS$' -c "Samba ODC for MYDOMAIN" -d /nonexistent \
        -s /sbin/nologin

except that pw will complain that '$' is not a valid character in a
username.  Off hand the only way I can think of to get round that is
to create the account without the '$' and then use vipw(8) to add it
after the fact:

    # pw useradd -n 'PERSEUS' -c "Samba ODC for MYDOMAIN" -d /nonexistent \
        -s /sbin/nologin
    # vipw
    # vi /etc/group
    # id 'PERSEUS$'
    uid=1002(PERSEUS$) gid=1002(PERSEUS$) groups=1002(PERSEUS$)

        Cheers,

        Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
                                                      Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to