Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
This is my first post. I am not all that new to Linux. I have done lots of reading on the OS but always felt a little timid when it came to trying out stuff.
Here is my problem I have a stand alone samba server I am trying to setup to share all my digital photos and other doc. I can see the share from other machines. On the windows machines you can see the users home directory and the share itself in an folder icon. Whenever I try to access the share it asks for a passwd. I enter the passwd and the share folder is visible when I click on the folder I get and error message.
The share name is pics so I get the error.
pics is not accessible. You might not have permissions to use this network resource. contact the network administrator of this server to find out if you have access permissions.
no network provider accepted the given network path.
On my other Linux boxes. I can see the share when I click on it, there is just a empty folder without any files.
Here is my samba config file.
workgroup = cleus
server string = Samba Server
security = user
encrypt passwords = yes
; guest ok = no
; guest account = nobody
; encrypt passwords = yes
; guest ok = no
; guest account = nobody
[homes]
comment = Home Directories
browseable = yes
writeable = yes
; valid users = %S
; valid users = MYDOMAIN\%S
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
; guest ok = no
; writeable = no
printable = yes
# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
; comment = Network Logon Service
; path = /var/lib/samba/netlogon
; guest ok = yes
; writable = no
; share modes = no
# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
; [Profiles]
; path = /var/lib/samba/profiles
; browseable = no
; guest ok = yes
# A publicly accessible directory, but read only, except for people in
# the "staff" group
; [public]
; comment = Public Stuff
; path = /home/samba
; public = yes
; writable = yes
; printable = no
; write list = +staff
[pics]
comment = all our photos
path = /pics
; writeable = no
; browseable = yes
guest ok = yes
These are the permissions I have on the shared files.
drwxr-xr-x 2 root root 12288 Mar 30 16:10 Pictures
-r-xr-xr-x 1 root root 658215 Oct 14 2005 Pictures 001.jpg
-r-xr-xr-x 1 root root 305772 Oct 14 2005 Pictures 002.jpg
Samba, on its own, assumes the samba users you created exist in the system.
If you need the samba passwd and the system passwd to be the same, you should add to smb.conf(G):
Quote:
unix password sync = yes
If however you dont want users to be asked for a password when they connect to a share (as u indicated by enabling guest ok)
then you need to modify security level to share in smb.conf(G):
Quote:
security = share
and on the share defination
Quote:
[pics]
comment = all our photos
path = /pics
read only = yes
browseable = yes
guest ok = yes
I don't agree with modifying the line to "Security = Share". That technology is for Windows 95 and obsolete. The Samba 3 HOWTO & Reference guide only has a short paragraph describing it.
You should use "ls -ld /pics" but I think the result is the same as the ".." entry.
You also need in the general section of smb.conf the line:
Code:
map to guest = bad user
This will map an unauthorized user to the user "guest" in Windows and the user "nobody" in Linux. The "nobody" user has read rights to the share as it is presently defined.
These two changes should be enough.
---
Also make sure that you have the services starting up when you boot. And check your firewall settings. I would run nmap locally, and then from a different host. Compare the list of open ports and see if any samba port is blocked. Check the TCP & UDP ports. To save time check 119, 135-139 & 445.
From the Samba 3.2 HOWTO:
Code:
If you are setting up a rewall, you need to know what TCP and UDP ports
to allow and block. Samba uses the following:
Port 135/TCP - used by smbd
Port 137/UDP - used by nmbd
Port 138/UDP - used by nmbd
Port 139/TCP - used by smbd
Port 445/TCP - used by smbd
I might be remembering wrong, because I thought they were 136-139 & 445. You'll want to double check that. Not all may be used with XP but it depends you how XP is configured. Browsing from some Linux clients may work better if you open the udp ports as well.
These are the errors I need to focus on. Any ideas?
ERROR: the 'unix password sync' parameter is set and the 'passwd program' () cannot be executed (error was No such file or directory).
ERROR: the 'passwd program' () requires a '%u' parameter.
How many users do you have? How do they authenticate? Do you want to run the samba server as a domain controller? For a globally readable share, authentication isn't necessary. You can comment out the unix password sync line as billymayday suggested.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.