[luau] user group defined logon scripts with Samba
Karotu Tannang
karotu.kangare at tskl.net.ki
Tue Nov 4 19:11:01 PST 2003
Mauri All - (Hi All)
I've been trying to get Samba to redirect its users to their respective
logon scripts but have had no luck lately.
Here is my smb.conf
#========================================================
[global]
workgroup = MWE
netbios name = Server01
encrypt passwords = yes
security = user
domain master = yes
domain logons = yes
log level = 3
log file = /etc/samba/samba.log
Logon Script = %G\logon.bat # I have also tried Logon Script = %G.bat
but still no script execution
logon home = \\Server01\%U
logon path = \\Server01\%U
os level = 99
preferred master = True
wins support = no
deadtime = 0
#Automatically add them users/machines
add user script = /usr/sbin/useradd -d /dev/null -g machines -c 'Machine
Account' -s /bin/false -M %u
[homes]
read only = no
create mask = 0600
writable = yes
directory mask = 0700
[netlogon]
guest ok = yes
writable = yes
public = yes
path = /usr/netlogon
create mask = 0600
directory mask = 0777
[General]
path = /home/data/General
writable = yes
public = yes
[AccountShare]
path = /home/data/Accounts
writeable = yes
public = no
valid users = @Account @LANAdmin
[AdminShare]
path = /home/data/Administration
writeable = yes
public = no
valid users = @Admin @LANAdmin
[CivilShare]
path = /home/data/Civil
writeable = yes
public = no
valid users = @Civil @LANAdmin
[EnergyShare]
path = /home/data/Energy
writeable = yes
public = no
valid users = @Energy @LANAdmin
[RegistryShare]
path = /home/data/Registry
writeable = yes
public = no
valid users = @Registry @LANAdmin
[TechShare]
path = /home/data/Technical
writeable = yes
public = no
valid users = @Technical @LANAdmin # there is a group called Technical,
not Tech
[WaterShare]
path = /home/data/Water
writeable = yes
public = no
valid users = @Water @LANAdmin
#==========================================
Under /usr/netlogon I created the group directories with read rights for ALL
groups.
Each directory contains a file called logon.bat with read and execution
rights to the groups..
contents of logon.bat
NET USE G: \\Server01\General
NET USE L: \\Server01\WhichevergroupShare
Somehow I can't the scripts to be loaded. I now have an idea but I'd like
get some feed back as well in order to improve this smb.conf and/or
logon.bat
With many thanks in advance...
Regards,
Karotu
--
Karotu Tannang
Support
Kangare Software Engineering
More information about the LUAU
mailing list