[Samba] Reconnect to Shares not working

Bob Sullivan tech at robian-tl.co.uk
Wed May 19 16:40:52 GMT 2004


If you have configured Samba as a Domain Controller you can create a simple 
logon script for each user and place it in the logon folder on the linux 
server.  You need to have a section in samba.conf which defines the path eg..

[netlogon]
path = /home/smb/netlogon
write list = admin

Place the user scripts (actually ms bat files) in the logon folder.  eg script 
for fred would be called  fred.bat

@echo off
echo  Executing logon script
net use f: /home
net use g: \\servername\sambasharename


If you substitute \\servername with the netbios name of the server (as shown 
in samba.conf) and substitue \sambasharename with the name of the samba share 
that you have allowed the user access to - it will work fine.

The net use f: /home   will map the f: drive on the windows box to the users 
home directory on the linux server.  Make sure the samba path to the home 
directory is the same as that used by Linux.

Hope this helps.

Bob
 


On Wednesday 19 May 2004 08:02, AndyLiebman at aol.com wrote:
> I've just reconfigured my Samba 3 setup so that Windows users basically
> only see shares they are supposed to see when they browse the Samba server
> through Explorer.
>
> At the suggestion of others on this list, I used the "include =
> /etc/samba/smb.%U.conf" feature and create a "smb.username.conf" file for
> each Linux user.
>
> To get Explorer to display the shares assigned to each user, I created a
> common share that everybody can access called "log_on_here". When users
> click on that share, their Windows machine gets logged onto the Samba
> server. Then when users click on the BACK button in Explorer, their
> individual shares show up.
>
> Maybe has a better way of letting users "log in" to the Server. I couldn't
> think of one.
>
> Anyway, to make life easy for users, I suggested when they mapped their
> assigned shares, they checked the "reconnect on logon" box -- so their
> Windows machine would automatically reconnect to desired shares on the
> Samba server each time they booted up the client machine.
>
> However, I'm finding that the Windows machines aren't automatically
> reconnecting on each boot. The mapped share appears in Explorer with a red
> highlight (unconnected) until the user clicks on the share. The first click
> produces an error that the share is unavailable or you may not have
> permission to use it. Then the next click allows access to the share.
>
> Is there away to make this reconnecting of mapped (but private) shares less
> cumbersome?
>
> Your advice would be appreciated. Thanks in advance.
>
> Andy Liebman


More information about the samba mailing list