LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-09-2008, 04:35 AM   #1
samohn
Member
 
Registered: Aug 2008
Posts: 55

Rep: Reputation: 15
can not access Fedora 9 box from XP by Samba


I set up Samba on my Fedora 9 system but can not access the shared holder from XP system.
I can see the work group I set on the server from the Windows Network place. But, It returns error when I click on the work group icon. The error message is "Share is not accessble. You might not have permission to use the network resource. ... The network pass was not found"

I suspected SELinux's firewall and I turned it off and tried to connect to the samba server from the XP, but it did not work.

I have already spent a few days to solve this problem.
I will appreciate any suggestions and opinions.
Thank you in advance.

Samohn
 
Old 11-09-2008, 04:41 AM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
SELinux isn't a firewall, so did you turn SELinux off, or disable the firewall?
 
Old 11-09-2008, 04:45 AM   #3
jdbeyers
LQ Newbie
 
Registered: Nov 2008
Posts: 9

Rep: Reputation: 0
Hi,

Always check that your smb.conf file is correct by running testparm command.

Please also post your smb.conf file here so that I can have a look.

Ensure your permissions are always correct. For instance, if your SMB directory is /home/samba/public, ensure that /home/samba/public is 777 and so is /home/samba.

Now restart smb by running killall -HUP smbd nmbd and then try to connect again.

If you are successful, then start to change the parent permissions, in this case /home/samba, and then move to /home/samba/public until you have located the error.

The log files are also a great source of information, and are found at /var/log/samba.

Regards,
Jacques (http://b-squared.dnsalias.net)
 
Old 11-09-2008, 05:05 AM   #4
samohn
Member
 
Registered: Aug 2008
Posts: 55

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by billymayday View Post
SELinux isn't a firewall, so did you turn SELinux off, or disable the firewall?
Billymayday,

Thank you for your help. That is correct. SELinux is not a firewall. I have running SELinux under permissive mode.

I temporally flashed iptables with
#iptables -F command
and tested the connection from the XP.

Last edited by samohn; 11-09-2008 at 05:07 AM.
 
Old 11-09-2008, 05:09 AM   #5
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Can you post your smb.conf?

Are there any messages in the samba logs?
 
Old 11-09-2008, 05:40 AM   #6
samohn
Member
 
Registered: Aug 2008
Posts: 55

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jdbeyers View Post
Hi,

Always check that your smb.conf file is correct by running testparm command.

Please also post your smb.conf file here so that I can have a look.

Ensure your permissions are always correct. For instance, if your SMB directory is /home/samba/public, ensure that /home/samba/public is 777 and so is /home/samba.

Now restart smb by running killall -HUP smbd nmbd and then try to connect again.

If you are successful, then start to change the parent permissions, in this case /home/samba, and then move to /home/samba/public until you have located the error.

The log files are also a great source of information, and are found at /var/log/samba.

Regards,
Jacques (http://b-squared.dnsalias.net)
Jacques,

Thank you for your help. I have run testparm. the dump file was:

Quote:
[global]
workgroup = SHARE-LINUX
server string = Samba
security = SHARE
passdb backend = tdbsam
log file = /var/log/samba/log.%m
max log size = 50
cups options = raw

[homes]
comment = Home Directories
valid users = sam
read only = No

[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No

[share]
comment = Share holder
path = /var/samba/share
valid users = sam
read only = No
The smb.conf is :
Quote:
[global]

# ----------------------- Netwrok Related Options -------------------------
#
# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
#
# server string is the equivalent of the NT Description field
#
# netbios name can be used to specify a server name not tied to the hostname
#
# Interfaces lets you configure Samba to use multiple interfaces
# If you have multiple network interfaces then you can list the ones
# you want to listen on (never omit localhost)
#
# Hosts Allow/Hosts Deny lets you restrict who can connect, and you can
# specifiy it as a per share option as well
#
workgroup = share-linux
server string = Samba

; netbios name = MYSERVER

; interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24
; hosts allow = 127. 192.168.12. 192.168.13.


# --------------------------- Logging Options -----------------------------
#
# Log File let you specify where to put logs and how to split them up.
#
# Max Log Size let you specify the max size log files should reach

# logs split per machine
log file = /var/log/samba/log.%m
# max 50KB per log file, then rotate
max log size = 50

# ----------------------- Standalone Server Options ------------------------
#
# Scurity can be set to user, share(deprecated) or server(deprecated)
#
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.

security = share
passdb backend = tdbsam



# --------------------------- Filesystem Options ---------------------------
#
# The following options can be uncommented if the filesystem supports
# Extended Attributes and they are enabled (usually by the mount option
# user_xattr). Thess options will let the admin store the DOS attributes
# in an EA and make samba not mess with the permission bits.
#
# Note: these options can also be set just per share, setting them in global
# makes them the default for all shares

; map archive = no
; map hidden = no
; map read only = no
; map system = no
; encrypt passwords = yes
; guest ok = no
; guest account = nobody
; store dos attributes = yes


#============================ Share Definitions ==============================

[homes]
comment = Home Directories
; browseable = yes
writable = yes
; valid users = %S
; valid users = MYDOMAIN\%S
valid users = sam

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
; guest ok = no
; writable = 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

[share]
comment = Share holder
path = /var/samba/share
writeable = yes
browseable = yes
valid users = sam

[share-home]
path = /home/sam/samba/share
writeable = yes
browseable = yes
valid users = sam
comment = Sam Home
I followed your suggestions. I created another share directory /home/sam/samba/share and set permission as 777 to samba and share directory. I killed and restarted smbd and nmbd, but I still could not access the linux system from the XP.
 
Old 11-09-2008, 01:51 PM   #7
samohn
Member
 
Registered: Aug 2008
Posts: 55

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by billymayday View Post
Can you post your smb.conf?

Are there any messages in the samba logs?
Here are the log files:
log.nmbd
Quote:
2008/11/09 05:10:03, 0] nmbd/nmbd.c:terminate(68)
Got SIGTERM: going down...
[2008/11/09 05:10:04, 0] nmbd/nmbd.c:main(849)
nmbd version 3.2.0rc1-15.fc9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2008
[2008/11/09 05:10:24, 0] nmbd/nmbd.c:terminate(68)
Got SIGTERM: going down...
[2008/11/09 05:10:24, 0] nmbd/nmbd.c:main(849)
nmbd version 3.2.0rc1-15.fc9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2008
[2008/11/09 05:12:34, 0] nmbd/nmbd_become_lmb.c:become_local_master_stage2(395)
*****

Samba name server LOCALHOST is now a local master browser for workgroup SHARE-LINUX on subnet 192.168.170.20

*****
[2008/11/09 05:13:56, 0] nmbd/nmbd.crocess(646)
Got SIGHUP dumping debug info.
[2008/11/09 05:13:56, 0] nmbd/nmbd_workgroupdb.c:dump_workgroups(281)
dump_workgroups()
dump workgroup on subnet 192.168.170.20: netmask= 255.255.255.0:
SHARE-LINUX(1) current master browser = LOCALHOST
LOCALHOST 40849a03 (Samba)
[2008/11/09 05:23:42, 0] nmbd/nmbd.crocess(646)
Got SIGHUP dumping debug info.
[2008/11/09 05:23:42, 0] nmbd/nmbd_workgroupdb.c:dump_workgroups(281)
dump_workgroups()
dump workgroup on subnet 192.168.170.20: netmask= 255.255.255.0:
GLOBE(2) current master browser = LT1
SHARE-LINUX(1) current master browser = LOCALHOST
LOCALHOST 40849a03 (Samba)
~
log.smbd

Quote:
[2008/11/09 05:10:02, 0] smbd/server.c:main(1208)
smbd version 3.2.0rc1-15.fc9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2008
[2008/11/09 05:10:24, 0] smbd/server.c:main(1208)
smbd version 3.2.0rc1-15.fc9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2008
[2008/11/09 05:13:56, 1] smbd/server.cpen_sockets_smbd(644)
Reloading services after SIGHUP
[2008/11/09 05:13:56, 1] printing/printing.c:start_background_queue(1436)
Reloading services after SIGHUP
[2008/11/09 05:23:42, 1] smbd/server.cpen_sockets_smbd(644)
Reloading services after SIGHUP
[2008/11/09 05:23:42, 1] printing/printing.c:start_background_queue(1436)
Reloading services after SIGHUP
~
I am not familiar with these files. If you find something, please let me know.
 
Old 11-09-2008, 02:53 PM   #8
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
You don't appear to have set a path for homes. Try either defining this or commenting out the homes share in its entirety.

Standard version would be something like

path=/home/%u
 
Old 11-10-2008, 03:27 PM   #9
jdbeyers
LQ Newbie
 
Registered: Nov 2008
Posts: 9

Rep: Reputation: 0
Hi,

At a glance, everything looks fine. Is your Windows XP machine part of a NT/Win2K/Win2k3/etc domain?

Is your WinXP username "sam"?

Try setting up a NetBios server name for Samba.

To test your account details, run smbpasswd and ensure that your WinXP and SMB password is the same. Now test this by running in a DOS box:
net use z: \\xxx.xxx.xxx.xxx\share /user:sam password /persistent:no
Substitute the xxx's for the IP address of the server, to rule out name resolution issues. Then replace the word "password" for your "sam" account password.

If all fails, here is a sample smb.conf file for you to use.

# Global parameters
[global]
workgroup = b-squared
netbios name = homer
server string = B-Squared Linux Server (%v)

time server = yes
time offset = 0

socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

[public]
comment = Shared Public Directory
path = /home
browseable = yes
writeable = yes
create mode = 0777
create mask = 0777
directory mask = 0777

[web]
comment = Web
path = /var/www/html
browseable = yes
writeable = yes
create mode = 0777
create mask = 0777
directory mask = 0777

[tmp]
comment = tmp
path = /tmp
browseable = yes
writeable = yes
create mode = 0777
create mask = 0777
directory mask = 0777
 
Old 11-10-2008, 03:34 PM   #10
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Quote:
Originally Posted by jdbeyers View Post
Now test this by running in a DOS box:
net use z: \\xxx.xxx.xxx.xxx\share /user:sam password /persistent:no
Substitute the xxx's for the IP address of the server, to rule out name resolution issues.
Except he's using share security, so no point sending a password.
 
Old 11-10-2008, 03:54 PM   #11
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,963

Rep: Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530
Quote:
Samba name server LOCALHOST is now a local master browser for workgroup SHARE-LINUX on subnet 192.168.170.20
samba uses your computer's hostname as the netbios name by default. It appears that the hostname is localhost which fails since localhost refers to the local machine the user is working on. The easiest fix is to uncomment the netbios name = myserver statement in the smb.conf file and restart samba. You can change myserver as desired but is limited to 16 characters.
 
Old 11-11-2008, 10:25 AM   #12
samohn
Member
 
Registered: Aug 2008
Posts: 55

Original Poster
Rep: Reputation: 15
I tired to use the net command with the parameters, but net command does not seem to have use option!?

I also tried the sample code of smb.conf, but I still have the same problem.

What I did was copied the sample code to smb.conf.
then,
>service smb restart
>service nmb restart

Last edited by samohn; 11-11-2008 at 10:30 AM.
 
Old 11-11-2008, 11:58 AM   #13
JD50
Member
 
Registered: Nov 2007
Location: Virginia
Distribution: Fedora, RHEL, CentOS
Posts: 67

Rep: Reputation: 17
Quote:
Originally Posted by samohn View Post
I tired to use the net command with the parameters, but net command does not seem to have use option!?

I also tried the sample code of smb.conf, but I still have the same problem.

What I did was copied the sample code to smb.conf.
then,
>service smb restart
>service nmb restart
Did you try what michaelk suggested? That is exactly what I was going to suggest.
 
Old 11-11-2008, 02:38 PM   #14
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
What is in the samba logs?
 
Old 11-12-2008, 06:57 AM   #15
samohn
Member
 
Registered: Aug 2008
Posts: 55

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by JD50 View Post
Did you try what michaelk suggested? That is exactly what I was going to suggest.
Yes, I did. I commented out netbios name.
 
  


Reply


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
Xp-host can't access internet through my Fedora box?? Techno T Linux - Networking 6 06-14-2007 01:25 PM
Samba - No Write Access from Linux Box HKDude Linux - Networking 6 05-30-2005 03:59 PM
Samba: Windows XP Pro access to Linux box bramadams Slackware 7 02-05-2005 10:25 AM
Access Mandrake box from Fedora Core 1 box btexpress Linux - Networking 0 05-30-2004 08:50 PM
Samba access WIN XP shares from linux box rmanocha Linux - Software 8 10-24-2003 09:28 AM


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