auto.smb acts weird when smbfs is not installed

Bug #158816 reported by Marius Gedminas
32
This bug affects 3 people
Affects Status Importance Assigned to Milestone
autofs (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

Binary package hint: autofs

If you install autofs and enable /etc/autofs.smb, you can list SMB/CIFS shares with ls /smb/servername, but you can't mount them. Instead of a meaningful error message, ls /smb/servername/sharename will give you the same list of shares, and so on, recursively. To make it actually work you also have to install smbfs. It would be nice if autofs could somehow convey that suggestion to the user.

You can detect this loop in autofs.smb by checking whether $key contains a '/', but I don't know how to make it emit an error message. A simple echo to stderr did not work.

Revision history for this message
emilio (emiliomaggio) wrote :

In my case installing smbfs does not solve the problem. Is this the same bug or should I submit a new one?

Revision history for this message
Chuck Short (zulcss) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please answer these questions:
1. Is this reproducible?
2. If so, what specific steps should we take to recreate this bug? Be as detailed as possible.
This will help us to find and resolve the problem.

Changed in autofs (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Nicolas Joyard (joyard-nicolas) wrote :

This bug is reproducible:
1. Ensure smbfs is not installed (or uninstall it if it is)
2. cd /auto.smb_base_dir/some_server
3. ls displays the shared folder list on the server
4. cd some_shared_folder
5. ls

Observed behaviour:
The second "ls" command displays the shared folder list on the server.

Expected behaviour:
The second "cd" command should fail, displaying an error message that explains the shared folder cannot be mounted because of the missing smbfs package.

Revision history for this message
asis (supporto-asis) wrote :

In my case even with smbfs installed, problem still remains:
Ubuntu Jaunty 9.04 & autofs 4.1.4+debian-2.1ubuntu2

Revision history for this message
Chuck Short (zulcss) wrote :

Thanks for the information. Ill take a look at this for lucid.

Regards
chuck

Changed in autofs (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
michalzuber (michalzuber86) wrote :

Had the same issue with Karmic autofs. After installing smbfs it worked.
Some errors that I catch, maybe they help:

kernel: CIFS VFS: cifs_mount failed w/return code = -22
automount[24870]: >> missing codepage or helper program, or other error

Revision history for this message
Alexandre Horst (alehorst) wrote :

I add this line in auto.smb to fix this behaviour. I have installed smbfs and it worked just after this line in the script.

echo $key | grep -q '/' && exit 0

The script exit if the key has slash like hostname/share. After that I start to mount automatically with ls /smb/hostname/.

I tried to do a ls */* in /smb/hostname with 99 shares avaiable before that change. The autofs started to mount recursively the same 99 shares over each share again, and again. My /smb and the mounting system got really a mess. The strange thing is nautilus works without any problem.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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