Is there a way to make samba automatically mount a home directory? That is, a user logging in (from Linux), enters its username and password(Samba), and the system automatically mounts the user's home directory from the samba server(without asking the password again). Has anyone ever tried to do this? And succedeed :-) ? -- nneves@di.fc.ul.pt Dept. Informatica, Fac. Ciencias, |\ | |\ | Tel: +351 1 7500058 Univ. Lisboa, Bloco C5, Campo Grande | \|uno | \|eves Fax: +351 1 7500084 1700 Lisboa, Portugal
Nope, but there it will likely involve pam, and the encrypted filesystem @ http://members.home.net/id-est/ would likely have a lot of code to use. Kenneth On Fri, 8 Oct 1999, Nuno Miguel Neves wrote:> Is there a way to make samba automatically mount a home directory? > That is, a user logging in (from Linux), enters its username and > password(Samba), and the system automatically mounts the user's home > directory from the samba server(without asking the password again). > > Has anyone ever tried to do this? And succedeed :-) ? > > -- > nneves@di.fc.ul.pt Dept. Informatica, Fac. Ciencias, > |\ | |\ | Tel: +351 1 7500058 Univ. Lisboa, Bloco C5, Campo Grande > | \|uno | \|eves Fax: +351 1 7500084 1700 Lisboa, Portugal > > >
Hi, all! I'm having some problems automounting Windows shares from my Debian GNU/Linux system. However, doing it manually with mount -t smbfs -o username=Johan,password=foobar //nisse/C /var/autofs/nisse/ works flawless. I'm totaly new with autofs so I don't know if I'm my setup is right, but this is what I've done; /etc/auto.master: /var/autofs/nisse /etc/auto.nisse /etc/auto.nisse: nisse -fstype=smbfs,username=Johan,password=foobar ://nisse/C I don't know if it's useful but this is what I see in syslog: Jan 28 18:17:30 bettan automount[218]: starting automounter version 4.0.0, path = /var/autofs/nisse, maptype = file, mapname /etc/auto.nisse Jan 28 18:17:30 bettan automount[218]: Map argc = 1 Jan 28 18:17:30 bettan automount[218]: Map argv[0] = /etc/auto.nisse Jan 28 18:17:30 bettan automount[218]: mount(bind): bind_works = 1 What am I missing here? :) PS. Please Cc me since I'm not subscribed. Thanks. Regards, -- Johan Svedberg, winkle@acc.umu.se, http://www.acc.umu.se/~winkle
Your automount setup looks fine to me. I was comparing it to my working one here and cannot see any difference except I use IP addresses in my target share names: [root@medulla /root]# cat /etc/auto.master # $Id: auto.master,v 1.2 1997/10/06 21:52:03 hpa Exp $ # Sample auto.master file # Format of this file: # mountpoint map options # For details of the format look at autofs(8). /ukfax /etc/auto.ukfax --timeout=60 /cortex /etc/auto.cortex --timeout=60 [root@medulla /root]# cat /etc/auto.cortex # $Id: auto.misc,v 1.2 1997/10/06 21:52:04 hpa Exp $ # This is an automounter map and it has the following format # key [ -mount-options-separated-by-comma ] location # Details may be found in the autofs(5) manpage backups -fstype=smbfs,username=medulla,password=medulla ://192.168.5.16/backups docs -fstype=smbfs,username=medulla,password=medulla ://192.168.5.16/docs If I then do an 'ls /cortex/docs' the share is automounted and I see the dir-isting from the NT server. You are triggering the automount by attempting access on the mount point? Cheers, Noel -----Original Message----- From: Johan Svedberg [mailto:winkle@acc.umu.se] Sent: 28 January 2003 18:03 To: samba@lists.samba.org Subject: [Samba] Automounting Hi, all! I'm having some problems automounting Windows shares from my Debian GNU/Linux system. However, doing it manually with mount -t smbfs -o username=Johan,password=foobar //nisse/C /var/autofs/nisse/ works flawless. I'm totaly new with autofs so I don't know if I'm my setup is right, but this is what I've done; /etc/auto.master: /var/autofs/nisse /etc/auto.nisse /etc/auto.nisse: nisse -fstype=smbfs,username=Johan,password=foobar ://nisse/C I don't know if it's useful but this is what I see in syslog: Jan 28 18:17:30 bettan automount[218]: starting automounter version 4.0.0, path = /var/autofs/nisse, maptype = file, mapname /etc/auto.nisse Jan 28 18:17:30 bettan automount[218]: Map argc = 1 Jan 28 18:17:30 bettan automount[218]: Map argv[0] = /etc/auto.nisse Jan 28 18:17:30 bettan automount[218]: mount(bind): bind_works = 1 What am I missing here? :) PS. Please Cc me since I'm not subscribed. Thanks. Regards, -- Johan Svedberg, winkle@acc.umu.se, http://www.acc.umu.se/~winkle -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Hi, 'autofs status' gives me: [root@medulla /root]# /etc/init.d/autofs status Configured Mount Points: ------------------------ /usr/sbin/automount --timeout 60 /misc file /etc/auto.misc /usr/sbin/automount --timeout 60 /ukfax file /etc/auto.ukfax /usr/sbin/automount --timeout 60 /cortex file /etc/auto.cortex Active Mount Points: -------------------- /usr/sbin/automount --timeout 60 /misc file /etc/auto.misc /usr/sbin/automount --timeout 60 /ukfax file /etc/auto.ukfax /usr/sbin/automount --timeout 60 /cortex file /etc/auto.cortex [root@medulla /root]# and 'df' gives me: [root@medulla /root]# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/sda6 3937220 2395084 1342132 65% / /dev/sda1 54416 3853 47754 8% /boot /dev/sdb1 35515412 8040072 25671244 24% /novanet [root@medulla /root]# The automount points are not listed..... HTH, Noel -----Original Message----- From: 'Johan Svedberg' [mailto:winkle@acc.umu.se] Sent: 28 January 2003 19:56 To: Noel Kelly Subject: Re: [Samba] Automounting * 030128 20:04 Noel Kelly <nkelly@citrusnetworks.net>:>> -----Original Message----- >> From: Johan Svedberg [mailto:winkle@acc.umu.se] >> Sent: 28 January 2003 18:03 >> To: samba@lists.samba.org >> Subject: [Samba] Automounting >> >> >> Hi, all! >> >> I'm having some problems automounting Windows shares from my Debian >> GNU/Linux system. However, doing it manually with >> >> mount -t smbfs -o username=Johan,password=foobar //nisse/C >> /var/autofs/nisse/ >> >> works flawless. >> >> I'm totaly new with autofs so I don't know if I'm my setup is right, but >> this is what I've done; >> >> /etc/auto.master: >> >> /var/autofs/nisse /etc/auto.nisse >> >> /etc/auto.nisse: >> >> nisse -fstype=smbfs,username=Johan,password=foobar ://nisse/C >> >> I don't know if it's useful but this is what I see in syslog: >> >> Jan 28 18:17:30 bettan automount[218]: starting automounter version >> 4.0.0, path = /var/autofs/nisse, maptype = file, mapname >> /etc/auto.nisse >> Jan 28 18:17:30 bettan automount[218]: Map argc = 1 >> Jan 28 18:17:30 bettan automount[218]: Map argv[0] = /etc/auto.nisse >> Jan 28 18:17:30 bettan automount[218]: mount(bind): bind_works = 1 >> >> What am I missing here? :)> Your automount setup looks fine to me. I was comparing it to my workingone> here and cannot see any difference except I use IP addresses in my target > share names:Another difference is that you are using a lower timeout.> [root@medulla /root]# cat /etc/auto.master > # $Id: auto.master,v 1.2 1997/10/06 21:52:03 hpa Exp $ > # Sample auto.master file > # Format of this file: > # mountpoint map options > # For details of the format look at autofs(8). > /ukfax /etc/auto.ukfax --timeout=60 > /cortex /etc/auto.cortex --timeout=60[...]> If I then do an 'ls /cortex/docs' the share is automounted and I see the > dir-isting from the NT server. You are triggering the automount by > attempting access on the mount point?Yes, but df shows that it doesn't even get mounted (when I use autofs). I'm suspecting that it might have something to do with that the PCMCIA gets reset:ed by cardctl (and then goes active again) after the autofs has been run:ed. But issueing /etc/init.d/autofs stop and then start wont work either. Tell me, what output does '/etc/init.d/autofs status' give you? Mine shows: Configured Mount Points: ------------------------ /usr/sbin/automount --timeout=300 /var/autofs/nisse file /etc/auto.nisse Active Mount Points: -------------------- /usr/sbin/automount --pid-file=/var/run/autofs/_:var_:autofs_:nisse.pid --timeout=300 /var/autofs/nisse file /etc/auto.nisse Gah, this is driving me nuts since it works so nice doing it from the commandline... PS. Don't forget to Cc me since I'm not subscribed. Regards, -- Johan Svedberg, winkle@acc.umu.se, http://www.acc.umu.se/~winkle