You must add  "root preexec" to the Section [profiles]
my section [profiles]:

comment = Network Profiles Service
        #path = %H
        path = /data2/profiles
        read only = No
        store dos attributes = Yes
        create mask = 0600
        directory mask = 0700
        write list = @DomainUsers @root
        root preexec = /usr/local/bin/mkprofile.sh %u %g
 


Wed, 16 Mar 2011 12:04:40 +0100 письмо от "J. Echter" 
<j.ech...@elektro-mayer-echter.de>:

> Am 16.03.2011 11:33, schrieb Wasil:
> > Hi
> > You must have something like this:
> >
> > in smb.conf^
> > [profiles]
> > .....
> >     root preexec = /usr/local/bin/mkprofile.sh %u %g
> >   ....
> >
> > mkprofile.sh:
> >
> > #!/bin/sh
> > PROFILE=/data2/profiles/$1
> > if [ ! -e $PROFILE ]; then
> > mkdir -pm700 $PROFILE
> > chown $1:$2 $PROFILE
> > fi
> >
> > Wed, 16 Mar 2011 11:09:59 +0100 письмо от "J.
> Echter"<j.ech...@elektro-mayer-echter.de>:
> >
> >> Hi,
> >>
> >> i have a Samba PDC (no LDAP) and added add user script to my config.
> >>
> >> I can create the user with no problems, login is possible but the
> >> /home/samba/profile/user dir is not created.
> >>
> >> Any hints on that?
> >>
> >> script commands i added:
> >>
> >> add user script = /usr/sbin/useradd -m '%u' -g ntusers -G ntusers -s
> >> /bin/false
> >> delete user script = /usr/sbin/userdel -r '%u'
> >> add group script = /usr/sbin/groupadd '%g'
> >> delete group script = /usr/sbin/groupdel '%g'
> >> add user to group script = /usr/sbin/usermod -G '%g' '%u'
> >> add machine script = /usr/sbin/useradd -s /bin/false -d /var/lib/nobody
> >> '%u' -g machines
> >>
> >>
> >> this is running on Ubuntu 10.04-LTS server
> >>
> >>
> >> greetings
> >>
> >> Juergen.
> >> -- 
> >> To unsubscribe from this list go to the following URL and read the
> >> instructions:  https://lists.samba.org/mailman/options/samba
> Hi, thanks for the hint.
> 
> but the profile dir doesn't get created.
> 
> i edited the path in the script and gave it chmod u+x (to be sure :) )
> 
> still nothing created.
> 
> if i run the script by hand it works.
> -- 
> To unsubscribe from this list go to the following URL and read the
> instructions: 
> https://lists.samba.org/mailman/options/samba

--
Мой Мир@Mail.Ru в твоем мобильном!
Просто зайди с телефона на m.mail.ru

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

Reply via email to