[Samba] Automounting Windows XP share on Linux

Jeffrey Barish jeff_barish at earthlink.net
Sat Nov 12 22:49:25 GMT 2005

I have /etc/auto.master and /etc/auto.smb such that 

ls /smb/<name of system> 

works for the two Win98 machines on my network (the machines get
automatically mounted and the directory contains "C").  When I try the same
command on the Windows XP machine, I get 

No such file or directory

The auto.smb file that came with my OS (Libranet 3) uses smbclient to get a
list of resources on the target.  With the Win98 machine, the output of 

smbclient -gNL Win98machine


Disk|C|C on Win98machine 
IPC|IPC$|Remote Inter Process Communication

But, smbclient -gNL WindowsXPmachine produces

IPC|IPC$|Remote IPC 
Disk|print$|Printer Drivers 
Disk|C on WindowsXPmachine| 
Disk|ADMIN$|Remote Admin 
Disk|C$|Default share

auto.smb makes a command option string from this output using awk by looking
for lines that start with "Disk" and then using the token that follows the
"|". In the case of the Win98 machines, it gets "C", which is what gets
mounted. But most, if not all, of the Disk lines from the XP machine are
bogus. Certainly "print$" is not a mountable drive. Nor is "ADMIN$". "C on
WindowsXPmachine" is a comment, not the name of a drive. That leaves "C$".
I don't know what effect the $ has, but otherwise this entry is correct.
Does anyone know why I am getting the other entries?  Is there anything I
can do to Windows XP to suppress these bogus responses?  If anyone else has
a Windows XP server, do you get the same stuff back from smbclient?
Jeffrey Barish

More information about the samba mailing list