LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Fstab problem with Samba (https://www.linuxquestions.org/questions/linux-newbie-8/fstab-problem-with-samba-223472/)

jalperin 08-28-2004 09:10 AM

Fstab problem with Samba
 
I'm trying to automatically mount a second hard drive every time I boot up and then share it with Samba so that a networked Windows XP machine can access it.

I included the following line in my /etc/fstab file:
/dev/hdg1 /mnt/backup80 ext3 auto,user,rw,exec,suid 0 0

My Samba smb.conf file has the following section:
[music]
path = /mnt/backup80
browseable = yes
public = yes
write list = jeff


When I view the Samba shares through Konqueror, I can see the music share, but when I try to view its contents, I get the error:
The file or folder smb://duke/music does not exist.

I can browse /mnt/backup80 with no problem.

What's happening and how do I fix it? Thanks. --Jeff

amfoster 08-28-2004 09:33 AM

I believe you have never actually mounted the share.

You are simply looking at what is shared in Konqueror.

Your Win box shud be able to access that mount assuming you started the samba daemons and you have a means of authenticating

michaelk 08-28-2004 09:35 AM

Have you checked your smb.conf file with the testparm command?
The following console command should show your music share.
smbclient -L <your_hostname>

jalperin 08-28-2004 10:27 AM

Thanks for the replies.

I can see the music share from Windows XP, but when I try to access it, it asks for username and password and then won't accept the correct username password. I've even tried inputting it in several different forms (DUKE\jeff, jeff@DUKE, etc.). I have another Samba share set up exactly the same way and I don't have to enter a password to see it. The only difference between that share and the music share is that it points to a directory on the bootup hard disk (specifically, /var/www/html). That's why I thought the problem was with how I mounted using fstab.

I have used testparm and everything checks out ok. When I execute the
smbclient -U jeff -L duke command, it can see the share, but I still don't seem to be tp access it.

Other thoughts? I'm new at this, so maybe I'm overlooking something simple.

amfoster 08-28-2004 10:32 AM

The security setting in your smb.conf is probably reading
security = user

With this setting you must create samba users.
If you have an account for jeff on the Linux box, then execute
smbpasswd -a jeff password

substitute a password where I wrote password above.

This will create a file named /etc/samba/smbpasswd and it will be used for the username and password prompt on the Windows box.

You can change security = user to security = share, but anyone in the same work group will have access to that music directory.

jalperin 08-28-2004 11:43 AM

I don't think it's the security issue you discussed because I already had that user/password setup. But I think I found a solution; I just don't understand why it works.

I added the following to my fstab:
/dev/hdg1 /var/www/html/music ext3 defaults 0 0 and then setup a section in my smb.conf and voila -- it worked just fine

Note that this line in my fstab:
/dev/hdg1 /mnt/backup80 ext3 defaults 0 0 (which is identical except for the /mnt/backup80 still doesn't work.

So is there some sort of problem with Samba browsing a /mnt ?

amfoster 08-28-2004 03:25 PM

Mounting under the mountpoint /mnt/somedirectory doesn't give me an error as long as the mount point exists. Is is possible that you didn't have a directory named /mnt/backup80 ?


All times are GMT -5. The time now is 06:41 PM.