LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Mounting samba windoze shares using autofs (https://www.linuxquestions.org/questions/linux-software-2/mounting-samba-windoze-shares-using-autofs-122452/)

Rounan 12-03-2003 06:57 PM

Mounting samba windoze shares using autofs
 
Hello,

Just set up a P133Mhz with RH9 as a music server for our house. Using MPD (awesome music daemon) and samba to access and play music shared on our network.

RIght now I'm mounting things in fstab, and it's working just fine - problem is our linux box is always-on, and people log on and off their pCS frequently - so I want to use autofs to keep the mounts current.

I've read the man pages and searched this forum for related questions - nada. autofs is installed and set to run on init, here are my auto.master and auto.music files:

#etc/auto.master
/mnt/Music file:/etc/music.misc --timeout=60
#EOF

#etc/auto.music
Music-Neil -fstype=smbfs Neil:/Music
Music-Steve -fstype=smbfs Stephenorlando:/My Music
Music-Elaine -fstype=smbfs Lainey:/Music
#EOF

To my thinking, this should do it, but I restart autofs and get:

----------
# /etc/init.d/autofs status
Configured Mount Points:
------------------------
/usr/sbin/automount --timeout 60 /mnt/Music file /etc/music.misc

Active Mount Points:
--------------------
/usr/sbin/automount --timeout 10 /mnt/Music file /etc/music.misc

------------
I don't know what /usr/sbin/automount is, but when I cd into /mnt/Music, there's nothing there.

I have a few ideas, can someone confirm/deny/help me?

Authentication:
Is the stupid windoze server waiting for a user name and password that don't exist, and I can't seem to specify?

/.autofs :
I read a howto that said autofs used a temp dir /.autofs, but the howto was 3 years old and autofs didn't create any such directory on installation, so I left it that way.

Your solution here...

Thanks!
--Rounan

-----------------------------------------------------
Edit:
I got some time, and looked into both of my suspicions. Didn't help. THe files now look like this:
#auto.master
/mnt/Music file:/etc/auto.music --timeout=60

#EOF

#auto.music
Music-Neil -fstype=smbfs,user=,password= ://Neil/Music
Music-Elaine -fstype=smbfs,user=,password= ://Lainey/Music
Music-Steve -fstype=smbfs,user=,password= ://Stephenorlando/My Music

#EOF

And $ /etc/init.d/autofs status gives:

-----------------
Configured Mount Points:
------------------------
/usr/sbin/automount --timeout 60 /mnt/Music file /etc/auto.music

Active Mount Points:
--------------------
/usr/sbin/automount --timeout 60 /mnt/Music file /etc/auto.music
-----------------

And there's nothing in the mnt/Music directory.
I also tried having the auto.master file refer to 3 seperate config files, each with only one of the above mount points specified, inc ase maybe it was the multiple-mount thing confusing it - no result.
I read somewhere that it's OK to mount multiple NFS to the same point - is this wrong?

Also di an apt-get upgrade, just to make sure I've got current versions - smb updated, but didn't help matters.

And I'm at a complete loss... Anyone?

--Rounan

peter_robb 12-05-2003 01:24 PM

Windows/SMB uses logon names & passwords to validate the connections, hence the timeouts you are getting.

In /etc/fstab, have the 3 mounts listed with the -o option completed with username and password. (see man smbmount)

Then automount only needs the local /mnt/ directory to reference the rest of the connection details from /etc/fstab.

Your smb.conf may show an example of a cdrom automount share, with root preexec & root postexec mounting commands which can mount the remote pc and unmount it after a timeout or a logout.

Rounan 12-05-2003 05:08 PM

Thanks for the response!
I'm still a little confused, though. My windows machines don't have usernames/passwords set up - when I mount with mount -t smbfs, it odesn't prompt for user, then prompts for password, to which I hit enter. and it mounts.
I tried specifying username=,password= but it didn't like that - authentication failed.
Then I specified username=guest,password=
and in the booting process it said: Mounting SMB Filesystems... [OK]
But when it booted, there was nothing in /mnt/Music (the directory I tried to mount to)

Also, you mentioned automount referencing fstab?? I'm confused - I thought they were two seperate entities, fstab for boot-based mounting, autofs for dynamic mounting.

There's no autofs example in smb.conf, thanks for the tip though.

Do you have automount working under similar conditions? Would you post your auto.master and auto.* files as examples? Or a sample fstab entry the somehow invokes automount?

Thanks,
--Rounan


All times are GMT -5. The time now is 09:52 PM.