automount and auto.smb not working

Bug #579857 reported by Thomas Schweikle
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
autofs5 (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: autofs5

automount setup:

auto.master:
/home/tps/fritz /etc/auto.smb -fritz.box --ghost

root@aesculap:~# /usr/sbin/automount -f -d /etc/auto.master
Starting automounter version 5.0.4, master map /etc/auto.master
using kernel protocol version 5.01
lookup_nss_read_master: reading master file /etc/auto.master
parse_init: parse(sun): init gathered global options: (null)
lookup_read_master: lookup(file): read entry /home/tps/fritz
.
master_do_mount: mounting /home/tps/fritz
automount_path_to_fifo: fifo name /var/run/autofs.fifo-home-tps-fritz
lookup_nss_read_map: reading map file /etc/auto.smb
parse_init: parse(sun): init gathered global options: fritz,box
mounted indirect on /home/tps/fritz with timeout 300, freq 75 seconds
st_ready: st_ready(): state = 0 path /home/tps/fritz
ghosting enabled

Now trying list directory contents:
tps@aesculap:~$ ll /home/tps/fritz/
total 4
drwxr-xr-x 2 root root 0 May 13 10:49 ./
drwxr-xr-x 74 tps tps 4096 May 13 10:49 ../

The log shows:
st_expire: state 1 path /home/tps/fritz
expire_proc: exp_proc = 140273256011536 path /home/tps/fritz
expire_cleanup: got thid 140273256011536 path /home/tps/fritz stat 0
expire_cleanup: sigchld: exp 140273256011536 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /home/tps/fritz

But calling /etc/auto.smb directly:
root@aesculap:~# /etc/auto.smb fritz.box
-fstype=cifs,credentials=/etc/auto.smb.credentials/fritz.box \
         "/PatriotMemory-01" "://fritz.box/PatriotMemory-01"

Afaik /home/tps/fritz should hold:
PatriotMemory-01

at least.

Some points:
- auto.smb isn't really documented. Searching google just brings up various cries for help!
- it's unclear how I have to code the host in auto.master. Use a "-" or not? I've tried both versions without any change.
- I could not figure out a way to make automount exhaust how it will call auto.smb and with which command line options.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: autofs 5.0.4-3.1ubuntu5
Uname: Linux 2.6.34-rc7 x86_64
Architecture: amd64
Date: Thu May 13 10:45:19 2010
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Alpha amd64 (20091230)
ProcEnviron:
 PATH=(custom, user)
 LANG=de_DE.utf8
 SHELL=/bin/bash
SourcePackage: autofs5

Related branches

Revision history for this message
Thomas Schweikle (tps) wrote :
Revision history for this message
Bryan (k1cd) wrote :

I use the line "/lan /etc/auto.smb -gid=1000,uid=1000" to call auto.smb and mount the shares as the primary user. I found that I had to 'borrow' Karmic files when I upgraded to Lucid as the /etc/auto.* installed with Lucid didn't work. Rather than chase down the problem, I just restored the previous auto.master and auto.smb to get things going.

I was curious as to why the smb sample line was removed from auto.master.

One thing I need to check is if the root permissions bug, the one that requires the gid, uid options, is still there. Without those options, the shares get mounted unavailable to users.

The new auto.smb does not seem to use the credentials file option like the old one does. You can see in auto.smb where the options setup line is but I haven't tried using that for the uid,gid options, just mount options (like the credentials file for login). I note that there are some variations of auto.smb around for problems like these.

Revision history for this message
Tux821 (tux821) wrote :

Same here.
Just did a fresh install of Ubuntu 10.04 (i686) on my netbook.
Installed autofs with:
apt-get install autofs smbfs

As before on Ubuntu 9.10 in the new 10.04 install I modified the auto.master, created the auto.smb.MyBookWorld and restarted the autofs service.

When I did a 'ls /smb/MyBookWorld' it seemed to work,
but when I tried a directory listing e.g. 'ls /smb/MyBookWorld/TON' I got
ls: cannot open directory /smb/MyBookWorld/TON/: No such file or directory

Restoring my old /etc/auto.* files from Ubuntu Karmic 9.10 and a restart of the service did make it work again. Just a posted above by Bryan (thanx!)

Chuck Short (zulcss)
Changed in autofs5 (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Chris Bainbridge (chris-bainbridge) wrote :

I did the following and it works:

apt-get install autofs smbfs smbclient
echo "/smb /etc/auto.smb" >> /etc/auto.master
mkdir /smb
/etc/init.d/autofs restart
ls /smb/buffalo/share (buffalo is a samba host, share is the share name - replace with local details)

Initially this was not working for me, since I did not have smbclient installed and it is called by auto.smb.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package autofs5 - 5.0.5-0ubuntu5

---------------
autofs5 (5.0.5-0ubuntu5) natty; urgency=low

  * Improve autofs.conf upstart script. Prevent race
    when trying to start networking. (LP: #733914)
  * debian/autofs5-ldap.install: Install schema in the right place.
    (LP: #699855)
  * Suggest smbfs if you want to use cifs. (LP: #579857)
  * Dropped 13ldap_module_linkage.dpatch no longer needed.
  * Refresh with missing upstream patches.
 -- Chuck Short <email address hidden> Sat, 02 Apr 2011 22:25:34 -0400

Changed in autofs5 (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Thomas Schweikle (tps) wrote :

Fix seems to work now out of the box.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.