[Samba] Execute commands depending on user
I'm running Samba as Primary Domain Controller. I created a group called
"machines" containing the domain users and another one called "admin"
containing some root accounts. This is my share section of smb.conf:
### Shares
# public share:
[public]
path = /home/public
comment = full access
writable = yes
browsable = yes
[profiles]
path = /home/profiles
comment = Personal shares
writeable = yes
browseable = yes
create mask = 0600
directory mask = 0700
# execute a command everytime a user logs in
root preexec = /usr/bin/touch /home/_userIN
# execute a command everytime a user logs out
root postexec = /usr/bin/touch /home/_userOUT
I would like that when a user of the group admin logs into the domain a
command is executed on the server. I tried to add the line below but the
command is executed only if the user access the share and not when he logs
into the domain:
[test]
path = /dev/null
valid users = @admin
root preexec = /usr/bin/echo Hello!
|