Distributed Winbind

Michael St. Laurent mikes at hartwellcorp.com
Mon Jan 28 10:42:02 GMT 2002

> -----Original Message-----
> From: "Esh, Andrew" <AEsh at tricord.com>
> To: "'samba-technical at lists.samba.org'" 
> <samba-technical at lists.samba.org>
> Subject: Distributed Winbind
> Date: Fri, 25 Jan 2002 14:29:08 -0600
> This message is in MIME format. Since your mail reader does 
> not understand
> this format, some or all of this message may not be legible.
> ------_=_NextPart_001_01C1A5DF.3AE6C130
> Content-Type: text/plain;
> 	charset="iso-8859-1"
> A while back there was a small amount of discussion about 
> winbind, and the
> problem of Unix-ID-to-Windows-SID mappings being done 
> independently on each
> Samba server. Files being moved between such servers via Unix 
> methods such
> as NFS and FTP servers would probably become owned by a 
> different Windows
> user.
> Is there any interest in having a Master winbind daemon open a network
> socket for Client winbind daemons to make requests from? Is this not a
> problem for anyone else?

I'm not sure if this helps but I created an add_smb_user script that used
ssh to get the UID and GID's from another unix system.  It's below if anyone
is interested.

# The script takes a single argument which is the username to create and is
# meant to be called by Samba via an smb.conf entry in the form of
# "add user script = <path>/add_smb_user %u"

# ---- Configuration Section ----
# Name of remote system from which to get info
# ---- End of Configuration Section ----


# Get entry from /etc/passwd on the remote system
PASSWDLN=`/usr/bin/ssh $REMSYS "/bin/grep $USER /etc/passwd"`
GROUPLST=`/usr/bin/ssh $REMSYS "/usr/bin/groups $USER | /bin/tr ' ' ,"`

# Parse out the User and Group ID numbers
NUID=`/bin/echo "$PASSWDLN"|/bin/cut -d: -f3`
NGID=`/bin/echo "$PASSWDLN"|/bin/cut -d: -f4`

# Create groups if necessary
for i in $GROUPLST
    if [ -z "`/bin/grep ^$i: /etc/group`" ]
        MGID=`/usr/bin/ssh $REMSYS "/bin/grep ^$i: /etc/group | cut -d:
        /usr/sbin/groupadd -g $MGID $i

/bin/mkdir /home/$USER 2>/dev/null
/bin/chmod 777 /home/$USER
/usr/sbin/useradd -n -M -u $NUID -g $NGID -G "$GROUPLST" -s /bin/true $USER
/bin/chown $USER /home/$USER
/bin/chmod 700 /home/$USER

Michael St. Laurent
Hartwell Corporation

[root at earth] root# rm -rf /bin/laden

More information about the samba-technical mailing list