LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 07-12-2009, 09:51 PM   #1
nzblade
LQ Newbie
 
Registered: Jul 2009
Posts: 5

Rep: Reputation: 0
Cannot access Samba Share in Fedora 9


I'm relatively new to liunx and I have recently installed Fedora 9 to act as a media server. I thought everything was going well until I tried to connect to my Samba share but could not. Here is what I know:-

This is my smb.conf
#======================= Global Settings==================
[global]
netbios name = FEDORA
workgroup = WORKGROUP
log level = 2
log file = /var/log/samba/log.%m
security = share

#============================ Share Definitions =============
[public]
path = /public
browseable = yes
guest ok = yes
read only = no
comment = Public


**************************************************************************************************** ********************

When I run 'smbclient -L locahost' from Fedora I get this


Sharename Type Comment
--------- ---- -------
public Disk Public
IPC$ IPC IPC Service (Samba 3.2.11-0.28.fc9)
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.2.11-0.28.fc9]

Server Comment
--------- -------
FEDORA Samba 3.2.11-0.28.fc9
OWNER-PC

Workgroup Master
--------- -------
WORKGROUP OWNER-PC

*****************************************************************************************

When I run this 'net view <ip address>' from XPLaptop I get

Shared resources at 192.168.0.5

Samba 3.2.11-0.28.fc9

Share name Type Used as Comment

------------------------------------
public Disk Public
The command completed successfully.


*******************************************************************************************
smb and nmb services are running and I have the correct ports open

137, 138 udp
139, 445 tcp


When I try to map a drive I get System error has occured, almost like it's a firewall problem but I think I don't have to setup anything specific on my router because it's all on the LAN


When I run this command 'net view 192.168.0.5' from Laptop

Shared resources at 192.168.0.5

Samba 3.2.11-0.28.fc9

Share name Type Used as Comment

------------------------------------
public Disk Public
The command completed successfully.

**************************************************************************************************

/public path has permissions 777



Both Laptops have workgroup = WORKGROUP

Not sure what the netbios is but I believe this can be anything I want?

So as far as I can tell, the laptop can see the Samba Share, Fedora can see it's own Samba share but nothing (both laptops XP and Vista or the Media Player) can connect to the /public folder

I don't login to either Laptop with a user account, so I believe I do not have to create a user.

Can Anyone HELP!
 
Old 07-13-2009, 03:16 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I believe you need the "map to guest = Bad User" in your global section of smb.conf. That way if a user connects to the share. Let's say user "sally". Sally will be mapped to user "guest". User "guest" is allowed access, thanks to the "guest ok = yes" line. Otherwise, Sally will be denied access.
 
Old 07-13-2009, 03:29 AM   #3
nzblade
LQ Newbie
 
Registered: Jul 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Added "map to guest = Bad User"
Still no luck

incidentally when I navigate to View computers and devices in Vista, i can see the share but I have no permissions to access it.
 
Old 07-13-2009, 04:14 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Did you restart the service after editing?

Quote:
I don't login to either Laptop with a user account, so I believe I do not have to create a user.
I don't understand what you mean by this. If you mean that you log in with the Administrator account on the laptops, that doesn't sound good. If you mean that the laptop user doesn't have an account on the samba server, then that is OK.

Take a look at the ownership and permissions of /public directory on your server. Besides the permissions allowed by smb.conf, the permissions of the directory itself are important. For a public writable share, change the user and group ownership to nobody:
sudo chown nobody.nobody /public

Set the permissions.
sudo chmod a=rwxt /public

The "nobody" user in Linux is the equivalent of the "guest" user in Windows.

Last edited by jschiwal; 07-13-2009 at 04:23 AM.
 
Old 07-13-2009, 04:19 AM   #5
maniannam
Member
 
Registered: Dec 2007
Location: India
Distribution: fedora 11
Posts: 64

Rep: Reputation: 16
Add the "valid users = <user name>" option in your public share.

I hope this will be help full.

Regards,
maniannam
 
Old 07-13-2009, 06:36 AM   #6
nzblade
LQ Newbie
 
Registered: Jul 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by maniannam View Post
Add the "valid users = <user name>" option in your public share.
This has at least got me to the point where my Vista machine now asks for a user name and Password. I thought the point of allowing Guest = OK was to eliminate the need for username and password to connect to share?
 
Old 07-13-2009, 07:18 AM   #7
maniannam
Member
 
Registered: Dec 2007
Location: India
Distribution: fedora 11
Posts: 64

Rep: Reputation: 16
I am not sure "guest ok = yes" option will eliminate the username/password.

Regards,
maniannam
 
Old 07-15-2009, 06:31 PM   #8
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Quote:
Originally Posted by maniannam View Post
I am not sure "guest ok = yes" option will eliminate the username/password.

Regards,
maniannam
It depends on whether you already have a session set up or not. You may get a prompt for username/password, but if you don't have an entry in /etc/samba/smbpasswd, you will still get access. You wouldn't even need to enter a password.

It depends on which security model you use as well. The default is "security = user". If the server doesn't know your credentials, it needs to ask before it can know yet whether you are a bad user, i.e. a user without credentials in /etc/samba/smbpasswd, or if it should create files using your real UID.

One option is to use the force user and force group in the share definition. Here is an example of a share definition for a MythTV box:
Code:
[recordings]
	comment = MythTV Recordings
	path = /myth
	public = yes
	writable = no
	create mask = 0777
	directory mask = 0777
	force user = nobody
	force group = nogroup
http://www.theonlineoasis.co.uk/mythtv.html
 
  


Reply



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
I can see my Samba share but cannot access it. newnewbie Linux - Server 26 05-02-2009 08:33 PM
Share Access with Samba? your_shadow03 Linux - Newbie 1 03-25-2009 09:51 AM
Access denied when attempting access samba share warlockvix Linux - Software 1 05-11-2007 02:36 PM
Samba Share access Spadge67 Fedora 3 11-19-2005 06:57 PM
Samba: can't access share thorax Linux - Software 4 02-13-2005 12:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration