View previous topic :: View next topic |
Author |
Message |
simcop2387 Apprentice
Joined: 14 Aug 2002 Posts: 200 Location: Galactic Sector ZZ9 Plural Z Alpha
|
Posted: Fri Sep 06, 2002 2:04 am Post subject: samba and network logon scripts |
|
|
ok i'm trying to setup my samba server to allow network logon scripts to mount shares on the network, i've got it going as the domain server, i'm not sure what info anyone would need to help so i'll post anything you ask, i'm new to doing this but i'm not new to samba. |
|
Back to top |
|
|
mikulus Tux's lil' helper
Joined: 03 Jun 2002 Posts: 77
|
Posted: Fri Sep 06, 2002 5:35 am Post subject: |
|
|
http://us6.samba.org/samba/ftp/docs/htmldocs/Samba-PDC-HOWTO.htmlHopefuuly this information will help you:
Quote: | Login Scripts
Login scripts are a powerful way of ensuring that certain things happen on your client machines when users log in. The scripts are standard DOS-type batch scripts, and are typically used to:
Map network drives to shares
Set registry entries
Copy configuration files
Perform computer maintenance
The login script is defined by the following entry in 'smb.conf':
logon script = <FILE_NAME>
Where <FILE_NAME> is a relative path to a file accessible in the [netlogon] share. <FILE_NAME> can take the standard Samba macros such as %U (user), %m (Client Netbios Name), %G (primary group of %U), which makes it relatively easy to customize the scripts.
Another method of customizing the login scripts is by using the 'ntlogon' utility, which processes a configuration file, and then generates a batch file based on the user, group, computer, and operating system of the client machine. Be aware that this requires ntlogon to be run as root! This can be accomplished with the following entry for login script:
logon script = %U.bat
and the following entries in the definition of the [netlogon] share
root preexec = /usr/bin/ntlogon -u %U -g %G -o %a -d /var/lib/samba/netlogon \
&& chmod 644 /var/lib/samba/netlogon/%U.bat;
root postexec = rm -f /var/lib/samba/netlogon/%U.bat
|
It was taken from http://www.mandrakeuser.org/docs/connect/csamba6.html
Samba PDC-Howto may aslo help http://us6.samba.org/samba/ftp/docs/htmldocs/Samba-PDC-HOWTO.html _________________ "Two things are infinite - the universe and human stupidity. And I am not sure about the universe." |
|
Back to top |
|
|
simcop2387 Apprentice
Joined: 14 Aug 2002 Posts: 200 Location: Galactic Sector ZZ9 Plural Z Alpha
|
Posted: Fri Sep 06, 2002 7:57 pm Post subject: |
|
|
ok i think i've got samba setup correctly, but i'm getting an error when my win9x boxes try to logon, i keep getting incorrect parameter, i'm not sure where the problem lies, i'm using the domain as the netbios name (not sure if this is correct or not so if its incorrect please correct me).
here's my smb.conf if it helps.
Code: |
[global]
workgroup = VOOTS
netbios name = server
server string = Samba Server %v
log file = /var/log/samba/log.%m
max log size = 50
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/private/smbpasswd
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
local master = yes
os level = 34
domain master = yes
preferred master = yes
domain logons = yes
logon script = %U.bat
dns proxy = no
[homes]
comment = Home Directories
browseable = no
writable = yes
[pub]
comment = Public Directory
browsable = yes
writeable = yes
path = /pub
guest ok = yes
[www]
comment = HTTP main directory
browsable = yes
writeable = yes
path = /home/httpd/htdocs
guest ok = yes
[cgi]
comment = CGI-BIN directory
browsable = yes
writeable = yes
path = /home/httpd/cgi-bin
guest ok = yes
[netlogon]
comment = Network Logon Service
path = /var/lib/samba/netlogon
guest ok = yes
writable = no
|
|
|
Back to top |
|
|
mikulus Tux's lil' helper
Joined: 03 Jun 2002 Posts: 77
|
Posted: Fri Sep 06, 2002 9:03 pm Post subject: |
|
|
Code: |
logon script = %U.bat
[netlogon]
comment = Network Logon Service
path = /var/lib/samba/netlogon
guest ok = yes
writable = no |
Make sure the *.bat files you are using as logon scripts are in /var/lib/samba/netlogon directory with the appropriate permissions.
Double check the syntax in the BAT files themselves.
From what you posted everything else looks OK. _________________ "Two things are infinite - the universe and human stupidity. And I am not sure about the universe." |
|
Back to top |
|
|
mikulus Tux's lil' helper
Joined: 03 Jun 2002 Posts: 77
|
Posted: Fri Sep 06, 2002 9:09 pm Post subject: |
|
|
OK, I was too quick to post my previous post:
You should have this defined:
Code: | ; where to store user profiles?
logon path = \\%N\profiles\%u
; where is a user's home directory and where should it
; be mounted at?
logon drive = H:
logon home = \\homeserver\%u
; specify a generic logon script for all users
; this is a relative **DOS** path to the [netlogon] share
logon script = logon.cmd |
Also, in [netlogon] section you should look like this:
Code: |
[netlogon]
path = /usr/local/samba/lib/netlogon
read only = yes
write list = ntadmin |
You also need to define [profiles]:
Code: | [profiles]
path = /export/smb/ntprofile
read only = no
create mask = 0600
directory mask = 0700 |
_________________ "Two things are infinite - the universe and human stupidity. And I am not sure about the universe." |
|
Back to top |
|
|
simcop2387 Apprentice
Joined: 14 Aug 2002 Posts: 200 Location: Galactic Sector ZZ9 Plural Z Alpha
|
Posted: Sat Sep 07, 2002 3:27 am Post subject: |
|
|
well i saw that on alot of webpages, but i looked into it, i didnt need all of those options such as profiles (thats all local still) and none of the machines are NT, just 98, my problem ended up being, i had to use the IP of the samba box (this network is in my home, not some professional company) so i set it up bare to do just what i wanted, works great now |
|
Back to top |
|
|
|