LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 04-24-2009, 08:21 AM   #1
newnewbie
LQ Newbie
 
Registered: Mar 2008
Posts: 13

Rep: Reputation: 0
I can see my Samba share but cannot access it.


Good morning to all!

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




Thanks for all the help.
 
Old 04-24-2009, 08:29 AM   #2
TBC Cosmo
Member
 
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 355

Rep: Reputation: 43
Have you added the appropriate users permitted to access the shares via 'smbpasswd -a'?
 
Old 04-24-2009, 08:49 AM   #3
newnewbie
LQ Newbie
 
Registered: Mar 2008
Posts: 13

Original Poster
Rep: Reputation: 0
I didn't forget

yes I did for all the users on my server.

smbpasswd -a username for all the users
 
Old 04-24-2009, 09:08 AM   #4
mail2mphani
Member
 
Registered: Jan 2009
Location: INDIA
Distribution: REDHAT
Posts: 64

Rep: Reputation: 15
r u enable the hosts allow
 
Old 04-24-2009, 09:39 AM   #5
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
What are the permissions on the /pics directory. For guest access, it should be r-x rights for other.
 
Old 04-24-2009, 10:28 AM   #6
newnewbie
LQ Newbie
 
Registered: Mar 2008
Posts: 13

Original Poster
Rep: Reputation: 0
This is the permission on the folder



[root@fileserver pics]# ls -al
total 8512
drwxrwxrwx 4 root root 4096 Sep 25 2008 .
drwxr-xr-x 24 root root 4096 Apr 6 23:36 ..




How can I configure host allow?
 
Old 04-24-2009, 11:18 AM   #7
chitambira
Member
 
Registered: Oct 2008
Location: Fife
Distribution: RHEL, Centos
Posts: 373
Blog Entries: 1

Rep: Reputation: 49
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
 
Old 04-24-2009, 01:11 PM   #8
newnewbie
LQ Newbie
 
Registered: Mar 2008
Posts: 13

Original Poster
Rep: Reputation: 0
I tried

I tried what you said and get the same results. The only difference is that I can browse homes.
 
Old 04-24-2009, 06:55 PM   #9
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
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.

Code:
[root@fileserver pics]# ls -al
total 8512
drwxrwxrwx 4 root root 4096 Sep 25 2008 .
drwxr-xr-x 24 root root 4096 Apr 6 23:36 ..
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.

Last edited by jschiwal; 04-24-2009 at 07:15 PM.
 
Old 04-24-2009, 06:58 PM   #10
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
What distro are you running? Could be an SELinux issue
 
Old 04-24-2009, 11:16 PM   #11
newnewbie
LQ Newbie
 
Registered: Mar 2008
Posts: 13

Original Poster
Rep: Reputation: 0
I think this is the problem when I ran testparm I get this error message.


ERROR: the 'passwd program' () requires a '%u' parameter
 
Old 04-24-2009, 11:26 PM   #12
newnewbie
LQ Newbie
 
Registered: Mar 2008
Posts: 13

Original Poster
Rep: Reputation: 0
I am using CentOS 5.2
 
Old 04-24-2009, 11:30 PM   #13
newnewbie
LQ Newbie
 
Registered: Mar 2008
Posts: 13

Original Poster
Rep: Reputation: 0
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.
 
Old 04-24-2009, 11:45 PM   #14
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
According to the config you posted, you don't have that set anyway, but comment the relevant line out in smb.conf
 
Old 04-25-2009, 08:19 AM   #15
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
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.
 
  


Reply

Tags
samba


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
Share Access with Samba? your_shadow03 Linux - Newbie 1 03-25-2009 10:51 AM
samba share cannot access muhammednavas Linux - Software 2 06-14-2007 05:49 AM
Access denied when attempting access samba share warlockvix Linux - Software 1 05-11-2007 03:36 PM
Samba Share access Spadge67 Fedora 3 11-19-2005 07:57 PM
Samba: can't access share thorax Linux - Software 4 02-13-2005 01:39 PM


All times are GMT -5. The time now is 05:31 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration