[Samba] Samba PDC adding new user, profile dir is not created

J. Echter j.echter at elektro-mayer-echter.de
Wed Mar 16 05:04:40 MDT 2011


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.echter at 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.


More information about the samba mailing list