This could be quite simple but I don't know how to do it. 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? Thanks very much, Sapan
You can add the following lines to your smb.conf file logon drive = u: logon home = \\PDC\homes\%u the %u is a built-in parameter that contains the current username. hth Charles On Tue, 10 Feb 2004 15:32:27 -0000, Ganguly, Sapan wrote> This could be quite simple but I don't know how to do it. > > 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? > > Thanks very much, > Sapan > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailman/listinfo/samba-- Open WebMail Project (http://openwebmail.org)
I don't think so, this feature seems to be intended for windows clients. You could do a script that rsh or ssh to the client when it logs in and mount the drive ex: ssh -l user@host "mount -t smbfs servershare -o username=%u". You would need to put this in the root preexec parameter in smb.conf (check the man smb.conf for more details). Charles On Tue, 10 Feb 2004 16:36:14 -0000, Ganguly, Sapan wrote> I'm logging into a Linux or Solaris machine running winbind, will it > work for that? > > -----Original Message----- > From: Charles Hamel [mailto:charles@pingouin.ca] > Sent: 10 February 2004 16:28 > To: Ganguly, Sapan > Cc: samba@lists.samba.org > Subject: Re: [Samba] Auto mapping to windows home drives? > > You can add the following lines to your smb.conf file > > logon drive = u: > logon home = \\PDC\homes\%u > > the %u is a built-in parameter that contains the current username. > > hth > > Charles > > On Tue, 10 Feb 2004 15:32:27 -0000, Ganguly, Sapan wrote > > This could be quite simple but I don't know how to do it. > > > > 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? > > > > Thanks very much, > > Sapan > > -- > > To unsubscribe from this list go to the following URL and read the > > instructions: http://lists.samba.org/mailman/listinfo/samba > > -- > Open WebMail Project (http://openwebmail.org)-- Open WebMail Project (http://openwebmail.org) ------- End of Forwarded Message ------- -- Open WebMail Project (http://openwebmail.org)
On Tue, 10 Feb 2004, Ganguly, Sapan wrote:> > This could be quite simple but I don't know how to do it. > > 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?Have you read the Samba-HOWTO-Collection.pdf? I am sure I documented this. :) There are three ways by which you can automap a network drive connection: 1) Through the User Profile information in passwd backend. frodo:~ # pdbedit -Lv jht Unix username: jht NT username: Account Flags: [UX ] User SID: S-1-5-21-1593769616-160655940-3590153233-2000 Primary Group SID: S-1-5-21-1593769616-160655940-3590153233-512 Full Name: John H Terpstra Home Directory: \\frodo\jht HomeDir Drive: H: Logon Script: scripts\logon.bat Profile Path: \\frodo\Profiles\jht Domain: MIDEARTH Account desc: Master Sleuth and Watchmaker Workstations: Munged dial: Logon time: 0 Logoff time: Mon, 18 Jan 2038 20:14:07 GMT Kickoff time: Sat, 02 Jan 2038 00:00:00 GMT Password last set: Sat, 16 Aug 2003 22:57:25 GMT Password can change: Sat, 16 Aug 2003 22:57:25 GMT Password must change: Mon, 18 Jan 2038 20:14:07 GMT See above the "Home Directory" and "HomeDir Drive" entries. 2) By storing persistent drive connections as part of the users' desktop profile in their roaming profile. 3) Through a network logon script. The command that would do this for the home directory is: net use H: /home - John T. -- John H Terpstra Email: jht@samba.org
John, Sorry, I should have been more specific. I'm logging into a Linux/Solaris machine running winbind, I'm using my windows username and password to login. At the moment I use pam_mkhomedir to create a new home directory automatically but it would be nice to map to the users existing home drive on the NT server instead. Sapan -----Original Message----- From: John H Terpstra [mailto:jht@samba.org] Sent: 10 February 2004 17:42 To: Ganguly, Sapan Cc: 'samba@lists.samba.org' Subject: Re: [Samba] Auto mapping to windows home drives? On Tue, 10 Feb 2004, Ganguly, Sapan wrote:> > This could be quite simple but I don't know how to do it. > > 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?Have you read the Samba-HOWTO-Collection.pdf? I am sure I documented this. :) There are three ways by which you can automap a network drive connection: 1) Through the User Profile information in passwd backend. frodo:~ # pdbedit -Lv jht Unix username: jht NT username: Account Flags: [UX ] User SID: S-1-5-21-1593769616-160655940-3590153233-2000 Primary Group SID: S-1-5-21-1593769616-160655940-3590153233-512 Full Name: John H Terpstra Home Directory: \\frodo\jht HomeDir Drive: H: Logon Script: scripts\logon.bat Profile Path: \\frodo\Profiles\jht Domain: MIDEARTH Account desc: Master Sleuth and Watchmaker Workstations: Munged dial: Logon time: 0 Logoff time: Mon, 18 Jan 2038 20:14:07 GMT Kickoff time: Sat, 02 Jan 2038 00:00:00 GMT Password last set: Sat, 16 Aug 2003 22:57:25 GMT Password can change: Sat, 16 Aug 2003 22:57:25 GMT Password must change: Mon, 18 Jan 2038 20:14:07 GMT See above the "Home Directory" and "HomeDir Drive" entries. 2) By storing persistent drive connections as part of the users' desktop profile in their roaming profile. 3) Through a network logon script. The command that would do this for the home directory is: net use H: /home - John T. -- John H Terpstra Email: jht@samba.org