[Samba] add machine script option

Charlie medievalist at gmail.com
Wed May 21 18:12:02 GMT 2008


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 <ltracchia at gmail.com> 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 <jht at samba.org> 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
>


More information about the samba mailing list