[Samba] add machine script option - Samba

This is a discussion on [Samba] add machine script option - Samba ; i'm reading through the samba howto. section 6.2.3 (page 105) shows the add machine script as follows: add machine script = /usr/sbin/useradd -d /var/lib/nobody -g 100 -s /bin/false -M %u i have a problem with the -M option. i cannot ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: [Samba] add machine script option

  1. [Samba] add machine script option

    i'm reading through the samba howto. section 6.2.3 (page 105) shows the add
    machine script as follows:

    add machine script = /usr/sbin/useradd -d /var/lib/nobody -g 100 -s
    /bin/false -M %u

    i have a problem with the -M option. i cannot find this option in useradd's
    man page.

    can i assume this example is incorrect??

    what would be a correct example???
    --
    To unsubscribe from this list go to the following URL and read the
    instructions: https://lists.samba.org/mailman/listinfo/samba


  2. Re: [Samba] add machine script option

    On Friday 16 May 2008, Leandro Tracchia wrote:
    > i have a problem with the -M option. i cannot find this option in
    > useradd's man page.


    Never worked on my distro, had to edit it out.

    --
    Chris
    --
    To unsubscribe from this list go to the following URL and read the
    instructions: https://lists.samba.org/mailman/listinfo/samba


  3. Re: [Samba] add machine script option

    On Friday 16 May 2008 09:46:15 am Leandro Tracchia wrote:
    > i'm reading through the samba howto. section 6.2.3 (page 105) shows the add
    > machine script as follows:
    >
    > add machine script = /usr/sbin/useradd -d /var/lib/nobody -g 100 -s
    > /bin/false -M %u
    >
    > i have a problem with the -M option. i cannot find this option in useradd's
    > man page.
    >
    > can i assume this example is incorrect??
    >
    > what would be a correct example???


    I am the author of that document. The problem is that on some Linux
    distributions the "-M" option is replaced with "-m" - it means to create the
    home directory if it does not exist. In fact, if I am not mistaken, the
    reference you are referring to specifically relates to this command on Red
    Hat Linux. Corrct?

    FYI: In the real world I would probably NOT include the "-M" option.

    - John T.
    --
    To unsubscribe from this list go to the following URL and read the
    instructions: https://lists.samba.org/mailman/listinfo/samba


  4. Re: [Samba] add machine script option

    On Friday 16 May 2008 09:51:56 am Chris Smith wrote:
    > On Friday 16 May 2008, Leandro Tracchia wrote:
    > > i have a problem with the -M option. i cannot find this option in
    > > useradd's man page.

    >
    > Never worked on my distro, had to edit it out.


    What did your log files tell you was the reason it failed?

    Simply saying it did not work does nothing to help anyone on this list. Please
    be constructive in your comments - help us to help you.

    Cheers,
    John T.
    --
    To unsubscribe from this list go to the following URL and read the
    instructions: https://lists.samba.org/mailman/listinfo/samba


  5. Re: [Samba] add machine script option

    On Friday 16 May 2008, John H Terpstra wrote:
    > What did your log files tell you was the reason it failed?


    Was many months ago and discovered, via the standard error output, by
    manually running the add machine script after not being able to add a
    system to the domain.

    > Simply saying it did not work does nothing to help anyone on this
    > list. Please be constructive in your comments - help us to help you.


    Sorry, thought I was. Just noting that in my distro that that particular
    option was invalid and leaving it to the reader to conclude that that
    may or may not be the case for their distro as well.

    It was a default smb.conf, that probably should have been cleaned for
    the distro by the maintainer. Certainly no fault of yours. I have
    always highly appreciated your knowledge, efforts, and work. Thank you.

    --
    Chris
    --
    To unsubscribe from this list go to the following URL and read the
    instructions: https://lists.samba.org/mailman/listinfo/samba


  6. Re: [Samba] add machine script option

    hi, thank you for replying... i do see an -m option which is for creating a
    home directory. i am not actually using Red Hat, i am using the much talked
    about Ubuntu 8.04. i believe Ubuntu is part of the Debian family. which
    distro uses the -M option out of curiosity?? is it SUSE??

    On Fri, May 16, 2008 at 1:26 PM, John H Terpstra wrote:

    > On Friday 16 May 2008 09:46:15 am Leandro Tracchia wrote:
    > > i'm reading through the samba howto. section 6.2.3 (page 105) shows the

    > add
    > > machine script as follows:
    > >
    > > add machine script = /usr/sbin/useradd -d /var/lib/nobody -g 100 -s
    > > /bin/false -M %u
    > >
    > > i have a problem with the -M option. i cannot find this option in

    > useradd's
    > > man page.
    > >
    > > can i assume this example is incorrect??
    > >
    > > what would be a correct example???

    >
    > I am the author of that document. The problem is that on some Linux
    > distributions the "-M" option is replaced with "-m" - it means to create
    > the
    > home directory if it does not exist. In fact, if I am not mistaken, the
    > reference you are referring to specifically relates to this command on Red
    > Hat Linux. Corrct?
    >
    > FYI: In the real world I would probably NOT include the "-M" option.
    >
    > - John T.
    >

    --
    To unsubscribe from this list go to the following URL and read the
    instructions: https://lists.samba.org/mailman/listinfo/samba


  7. Re: [Samba] add machine script option

    Red Hat linux includes a few extra switches on useradd. This is from
    the RHEL4 man page, but I think Fedora and all recent versions of Red
    Hat have these:

    -M The user home directory will not be created, even if the
    system wide settings from /etc/login.defs is to create home dirs.

    -n A group having the same name as the user being added to
    the system will be created by default. This option will turn off this
    Red Hat Linux specific behavior.

    Note the "-n" switch is related to Red Hat's penchant for creating
    single-user groups, which makes some sense in a pure RH linux
    environment but probably translates very poorly to the flat namespace
    shared by users and groups in the Windows world.

    I think Suse's been using Thorsten Kukuk's LDAP capable pwutils for
    some time, but Red Hat was shipping a fork of the original Jockgrrl
    shadowutils that was totally unPAMmed (it directly operated on
    /etc/passwd and /etc/shadow) until RHEL5. I have not yet examined or
    tested the RHEL5 stuff to see if they've got PAM working yet, or if
    they've managed to shoehorn in LDAP.

    If you are using a Red Hat samba server and you need to create machine
    trusts in any backend other than vanilla shadow suite (/etc/passwd,
    /etc/shadow and friends) you will need to write yourself a custom
    script. If your POSIX authentication backend is NIS, Hesiod or LDAP
    you will really really want to involve the person who built the
    backend, or failing that the person who currently maintains it.

    --Charlie

    On Fri, May 16, 2008 at 3:55 PM, Leandro Tracchia wrote:
    > hi, thank you for replying... i do see an -m option which is for creating a
    > home directory. i am not actually using Red Hat, i am using the much talked
    > about Ubuntu 8.04. i believe Ubuntu is part of the Debian family. which
    > distro uses the -M option out of curiosity?? is it SUSE??
    >
    > On Fri, May 16, 2008 at 1:26 PM, John H Terpstra wrote:
    >
    >> On Friday 16 May 2008 09:46:15 am Leandro Tracchia wrote:
    >> > i'm reading through the samba howto. section 6.2.3 (page 105) shows the

    >> add
    >> > machine script as follows:
    >> >
    >> > add machine script = /usr/sbin/useradd -d /var/lib/nobody -g 100 -s
    >> > /bin/false -M %u
    >> >
    >> > i have a problem with the -M option. i cannot find this option in

    >> useradd's
    >> > man page.
    >> >
    >> > can i assume this example is incorrect??
    >> >
    >> > what would be a correct example???

    >>
    >> I am the author of that document. The problem is that on some Linux
    >> distributions the "-M" option is replaced with "-m" - it means to create
    >> the
    >> home directory if it does not exist. In fact, if I am not mistaken, the
    >> reference you are referring to specifically relates to this command on Red
    >> Hat Linux. Corrct?
    >>
    >> FYI: In the real world I would probably NOT include the "-M" option.
    >>
    >> - John T.
    >>

    > --
    > To unsubscribe from this list go to the following URL and read the
    > instructions: https://lists.samba.org/mailman/listinfo/samba
    >

    --
    To unsubscribe from this list go to the following URL and read the
    instructions: https://lists.samba.org/mailman/listinfo/samba


+ Reply to Thread