Good $time :)

I'm trying to setup my system so, that it can automount Windows shares.
I'd like to have it so, that I do NOT have to specify each and every
host and share in the automount configuration; I'd like to have it so,
that it's as "comfortable" as the NFS solution that you can get, if you
use /etc/autofs/auto.net. That's a (Gentoo supplied) executable script.
If invoked with the target hostname, it'll print all the available exports
on that NFS host and thus allows to use these exports. Eg.:

[EMAIL PROTECTED] /dev/shm $ /etc/autofs/auto.net winds06
-fstype=nfs,hard,intr,nodev,nosuid,nonstrict,tcp,rsize=32768,wsize=32768,timeo=11,retrans=4,posix,nocto
 \
        /opt/ORCLfmap winds06:/opt/ORCLfmap \
        /pool winds06:/pool \
        /pool/netbackup-catalog winds06:/pool/netbackup-catalog

So, on that winds06 host, there are 3 exports (ORCLfmap, pool and 
netbackup-catalog). When I now do a "ls /net/winds06/pool", I'd
see what's in the pool export on winds06. In /etc/autofs/auto.master, I've
got:

/net    /etc/autofs/auto.net

I'd like to get something like this for Samba hosts as well. As a
(dysfunctional :() start, I've hacked up a "auto.smb" script, which
you can find at <http://askwar.pastebin.ca/527240>. If invoked on the
command line, it returns:

[EMAIL PROTECTED] /dev/shm $ /etc/autofs/auto.smb winfs001 
-fstype=smbfs,credentials=/home/askwar/winfs001.cred \
         R$      ://winfs001/R$ \
         HOME    ://winfs001/HOME \
         C$      ://winfs001/C$ \
         DAITMeeting     ://winfs001/DAITMeeting \
         DEPT    ://winfs001/DEPT \
         APPL    ://winfs001/APPL \
         F$      ://winfs001/F$ \
         ADMIN$          ://winfs001/ADMIN$ \
         WORKGROUPS      ://winfs001/WORKGROUPS \
         D$      ://winfs001/D$ \
         PUBLIC          ://winfs001/PUBLIC \
         E$      ://winfs001/E$

Those are all the shares on the winfs001 host. In auto.master, I've got
the following:

/smb    /etc/autofs/auto.smb

But it does not work :( When I do a "ls /smb/winfs001/DEPT", I get:

ls: cannot access /smb/winfs001/DEPT: No such file or directory

And in syslog:

==> ./syslog <==
Jun  1 09:13:46 winnb000488 automount[15874]: >> Usage: mount.smbfs service 
mountpoint [-o options,...]
Jun  1 09:13:46 winnb000488 automount[15874]: >> Version 3.0.24
Jun  1 09:13:46 winnb000488 automount[15874]: >> Options:
Jun  1 09:13:46 winnb000488 automount[15874]: >>       username=<arg>           
       SMB username
Jun  1 09:13:46 winnb000488 automount[15874]: >>       password=<arg>           
       SMB password
Jun  1 09:13:46 winnb000488 automount[15874]: >>       credentials=<filename>   
       file with username/password
Jun  1 09:13:46 winnb000488 automount[15874]: >>       krb                      
       use kerberos (active directory)
Jun  1 09:13:46 winnb000488 automount[15874]: >>       netbiosname=<arg>        
       source NetBIOS name
Jun  1 09:13:46 winnb000488 automount[15874]: >>       uid=<arg>                
       mount uid or username
Jun  1 09:13:46 winnb000488 automount[15874]: >>       gid=<arg>                
       mount gid or groupname
Jun  1 09:13:46 winnb000488 automount[15874]: >>       port=<arg>               
       remote SMB port number
Jun  1 09:13:46 winnb000488 automount[15874]: >>       fmask=<arg>              
       file umask
Jun  1 09:13:46 winnb000488 automount[15874]: >>       dmask=<arg>              
       directory umask
Jun  1 09:13:46 winnb000488 automount[15874]: >>       debug=<arg>              
       debug level
Jun  1 09:13:46 winnb000488 automount[15874]: >>       ip=<arg>                 
       destination host or IP address
Jun  1 09:13:46 winnb000488 automount[15874]: >>       workgroup=<arg>          
       workgroup on destination
Jun  1 09:13:46 winnb000488 automount[15874]: >>       sockopt=<arg>            
       TCP socket options
Jun  1 09:13:46 winnb000488 automount[15874]: >>       scope=<arg>              
       NetBIOS scope
Jun  1 09:13:46 winnb000488 automount[15874]: >>       iocharset=<arg>          
       Linux charset (iso8859-1, utf8)
Jun  1 09:13:46 winnb000488 automount[15874]: >>       codepage=<arg>           
       server codepage (cp850)
Jun  1 09:13:46 winnb000488 automount[15874]: >>       unicode                  
       use unicode when communicating with server
Jun  1 09:13:46 winnb000488 automount[15874]: >>       lfs                      
       large file system support
Jun  1 09:13:46 winnb000488 automount[15874]: >>       ttl=<arg>                
       dircache time to live
Jun  1 09:13:46 winnb000488 automount[15874]: >>       guest                    
       don't prompt for a password
Jun  1 09:13:46 winnb000488 automount[15874]: >>       ro                       
       mount read-only
Jun  1 09:13:46 winnb000488 automount[15874]: >>       rw                       
       mount read-write
Jun  1 09:13:46 winnb000488 automount[15874]: >> This command is designed to be 
run from within /bin/mount by giving
Jun  1 09:13:46 winnb000488 automount[15874]: >> the option '-t smbfs'. For 
example:
Jun  1 09:13:46 winnb000488 automount[15874]: >>   mount -t smbfs -o 
username=tridge,password=foobar //fjall/test /data/test
Jun  1 09:13:46 winnb000488 automount[15874]: mount(generic): failed to mount R 
         ://winfs001/R           HOME    ://winfs001/HOME         C       
://winfs001/C           DAITMeeting     ://winfs001/DAITMeeting         DEPT    
://winfs001/DEPT        APPL    ://winfs001/APPL         F       ://winfs001/F  
         ADMIN   ://winfs001/ADMIN       WORKGROUPS      ://winfs001/WORKGROUPS 
         D       ://winfs001/D    PUBLIC          ://winfs001/PUBLIC      E     
  ://winfs001/E (type smbfs) on /smb/winfs001
Jun  1 09:13:46 winnb000488 automount[15874]: failed to mount /smb/winfs001

So, there's obviously something wrong - but what?

Automounting Windows shares does work with this in auto.master:

/winfs001       file:/etc/autofs/auto.winfs001

And auto.winfs001 being:

*               
-fstype=smbfs,credentials=/home/askwar/winfs001.cred,uid=askwar,gid=users,rw    
://winfs001/&

But I don't want to have a line for every Windows host in my auto.master...

What do you guys do? I'm also NOT looking for a Gnome or even KDE only
solution. So anything using kioslaves is out of the question. It needs
to work normally on the command line as well.

Thanks a lot,
Alexander Skwar

PS: I know about <http://gentoo-wiki.com/HOWTO_Auto_mount_filesystems_(AUTOFS)>.
It's not what I'm looking for ;)

-- 
[EMAIL PROTECTED] mailing list

Reply via email to