Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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.
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.
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.
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?
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.