Shell script escape when new user is created

Rowland Penny repenny241155 at gmail.com
Fri Nov 14 04:10:31 MST 2014


On 14/11/14 08:17, Quentin Gibeaux wrote:
> There was an option for that on samba 3 : "add user script" ( 
> https://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html#ADDUSERSCRIPT 
> ), but it vanished with samba 4.
> Same story with "add machine script".

They are both still there, but will not do what the OP wants, the 'add 
user script' checked if a windows user existed on the samba server and 
if it didn't, the user was created. With a samba server joined to the 
domain the users already exist everywhere, so the 'add user script' line 
would be ignored.

I suppose that you could use cron to regularly call a script to check 
for any 'whenCreated' attributes created since the last time it was 
checked, and if any are found, the script could then do whatever is 
required.

Rowland
>
> On 14/11/2014 05:44, Greg Zartman wrote:
>> I started this topic over on the regular samba mailing list, but it 
>> seems
>> more of a development topic.
>> https://lists.samba.org/archive/samba/2014-November/186794.html
>>
>> I'm working to deploy Samba in the SME Server project, a customized 
>> version
>> of Centos for small businesses and home users with an emphasis on 
>> ease of
>> use and solid configuration.
>>
>> As we started to deploy Samba4, the issue came up of what to do about 
>> users
>> created using windows administration tools.  The users we create in 
>> the SME
>> Server are typically created in our server-manager GUI and multiple
>> services are setup for users when the user account is created such as
>> webmail, ftp, file shares, etc.   Since samba 4 allows administrators to
>> manage the Active Directory with windows administration tools, there 
>> really
>> needs to be a way that Samba can notify the system when a new user is
>> created.  Something like root preexec, but when users are created.  This
>> will allow for a shell script escape that could then be used to do other
>> things on the system.
>>
>> Thank you,
>>
>>
>> Greg J. Zartman
>> Board Member
>>
>> Koozali SME Server
>> SME Server user and community member since 2000
>



More information about the samba-technical mailing list