simon at topb.com.sg
Fri Apr 9 09:09:45 GMT 1999
Here's how you do a standard logon script, to also set each user to his/her
private home directory.
First, create or enable the [netlogon] share in your logon script, and make sure
that the share directory (e.g. /home/netlogon) exists. In your smb.conf file,
logon script = logon.bat
The file logon.bat can have commands as follows:
NET USE H: /HOME
NET USE P: \\SAMBASERVER\PUBLIC
Note the syntax of the first line maps the H: drive to whatever the user's
private home directory is. This works if you setup the [homes] share in
smb.conf properly. (Note that /HOME is preceded with a forward slash -- this is
an option, not a share name.) In case you're not aware, you have to create the
logon.bat file in a DOS/Windows text editor, as the logon script processor in
Win95 will expect the file in DOS text file CR/LF format.
At the risk of going a little too off topic, you might want to know that you can
also get your logon script to synchronise the clock of the workstation with that
of the samba server. In the globals section of your smb.conf file, set
time server = Yes
And in your logon.bat file, have a line that reads
NET TIME \\SAMBASERVER /SET
Hope this helps,
"Florian G. Pflug" wrote:
> On Sat, Apr 03, 1999 at 06:52:11AM +1000, Carey F. Cox wrote:
> > Well, I finally solved my problem of not being able to run executables
> > on a Win95 client from a samba share. At the DOS prompt, I had to issue...
> > C:> net use X: \\SAMBASERVER\SHARE
> > and then go through My_Computer to the X: drive. Evidently the executables
> > were looking for data files that were not in the path. If I add this to
> > a logon script, setting up this (and others) drive would be automated.
> > I know that I can setup a logon script for each user by adding...
> > logon script = %U.bat
> > into smb.conf, where user1.bat might contain the following...
> > net use X: \\SAMBASERVER\user1
> > net use P: \\SAMBASERVER\public
> > that would setup the two drives X and P. However, this would mean I
> > need to create a logon script for each user. Since only the home share
> > would change for each user (user1 in the example), is there a way to
> > setup one logon script for everyone that would automatically factor in
> > the user's particular home share?
> Yes, there is a smb.conf option named "logon path", or similar. I don't
> remember how it worked exactly, but I thnik it is what you need. This is,
> however, documentet somewhere in the samba-docs that come with the
> Greetings, Florian Pflug
More information about the samba