LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-03-2003, 06:57 PM   #1
Rounan
Member
 
Registered: Jun 2003
Location: Ontario
Distribution: Ubuntu, Gentoo, Debian
Posts: 416

Rep: Reputation: 30
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

Last edited by Rounan; 12-03-2003 at 11:21 PM.
 
Old 12-05-2003, 01:24 PM   #2
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 47
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.
 
Old 12-05-2003, 05:08 PM   #3
Rounan
Member
 
Registered: Jun 2003
Location: Ontario
Distribution: Ubuntu, Gentoo, Debian
Posts: 416

Original Poster
Rep: Reputation: 30
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mounting shares with samba darkleaf Linux - Software 1 02-13-2005 06:13 AM
How do I create shares with Windoze from Samba? dhatcher2 Linux - Software 2 10-28-2004 02:15 AM
Mounting windows shares using samba. TheDirtyPenguin Linux - Software 1 07-05-2004 08:49 AM
Mounting Samba shares and Samba Share Login time112852 Linux - Software 1 09-14-2003 02:23 PM
Mounting windows shares...using samba tarballed Linux - Software 7 07-01-2003 05:11 PM


All times are GMT -5. The time now is 01:43 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration