[Samba] Auto mapping to windows home drives?

TeeCee teecee at freemail.hu
Tue Feb 10 19:03:22 GMT 2004


Hi! :o)

I hope I'm not too late with the answer :)

CH> I don't think so, this feature seems to be intended for windows clients. You
CH> could do a script that rsh or ssh to the client when it logs in and mount the
CH> drive ex: ssh -l user at host "mount -t smbfs servershare -o username=%u". You
CH> would need to put this in the root preexec parameter in smb.conf (check the
CH> man smb.conf for more details).

>> logon drive = u:
>> logon home = \\PDC\homes\%u

>> > Does anyone know how I can automatically mount a users home drive
>> > (which is located on a windows server) when they log in?  Is there a 
>> > pam module for that?

The solving of this problem ismore eazee ,-)

1.) MAking a [logon] share for the Win logon scripts on NTservers:
    [netlogon]
        comment = Windows NT logonscripts dir
        path = /tar/Netlogon (Your path here)
        create mask = 0666
        directory mask = 0777
        browseable = No
        guest ok = yes
2.) Setting the logon script usage in [global]:
        logon path = /tar/Netlogon (Your path here)
        logon script = %u.bat (%u will be replaced with the username,
        or U can use a constant logonscript-name)
3.) Making logonscript for each user, or one, if You use a constant (I
prefer user-dependent):
       Use the "net help use |more" command from command line
       (Start/Run/type in/Enter) to see the usage of the command "net"
       under Windows.
       E.G.: "net use h: \\my_server\homedir"
       (You can mount (use) printers and set passwords in comandline
       also)

Every time the user logs in the logon script runs and You can set
everything that the script is capable. (I use for automounting some
dirs as drives and for setting the server's date&time at the
workstation, but You can run win compatible programs, and such things.)

BYE: TeeCee :o)



More information about the samba mailing list