-   Linux - Newbie (
-   -   samba server installed on fedora13 but but can't get access from other fedora and XP (

aungcho 05-12-2011 05:23 AM

samba server installed on fedora13 but but can't get access from other fedora and XP
I installed samba server on fedora13 last week
and share some files from samba server GUI
I also created samba user and password for shared folders

but I can't get access samba share folder from neither fedora machine nor Windows XP

When I open samba share from other fedora such as smb://
I can see share file and when I browse folder, password required box is appeared but after I put samba username and password

the Error message is Unable to mount location Failed to mount Windows share

even when I browsed samba share from windows xp

error message is \\\smbshare is not accessible. you might not persioon to use this network resource. Contact the administrator
The network path was not found.

Please, guide me how can I get access samba share from both fedora and XP

that is what I installed on server

[root@fedora2 mnt]# rpm -qa samba*

and here is my smb.conf file

# Samba config file created using SWAT
# from UNKNOWN (
# Date: 2011/04/29 22:05:08

workgroup = workgroup
server string = Samba Server Version %v
security = user
guest account = youth
log file = /var/log/samba/log.%m
max log size = 50
guest ok = yes
cups options = raw
smb passwd file = /etc/samba/smbpasswd
; encrypt passwords = yes

comment = for all users
read only = No
; browseable = yes
path = /home/aung/smbshare

comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No
path = /home/aung/Public
read only = no
; browseable = yes
valid users = abrt, ftp, operator, youth, yu

comment = personal share
path = /home/aung/smbshare
write list = yu
read only = no
; browseable = yes
valid users = youth

brownie_cookie 05-12-2011 05:32 AM

maybe the user you want to log in with, doesn't have enough permissions to see in that folder you want to go into?
When you share folders, make sure you have the right permissions on the folder AND the right sharing permissions !!!
For example, when user A is allowed to browser in a folder and his subfolders, but when the sharing permissions deny that user A... then user A can't see or do anything

rylan76 05-12-2011 06:51 AM

Hi here's my smb.conf it does more or less what you want to do and I can access without problems from both XP and other Fedora machines on my LAN:



netbios name = stefan
workgroup = my_workgroup
security = share
log file = /var/log/samba.log
log level =  1
wins support = yes
domain logons = no
logon drive = f:
logon home = \\stefan\%U
os level = 99
preferred master = yes
local master = yes
hosts allow =
encrypt passwords = yes
browseable = yes
lanman auth = yes
lm announce = yes

path = /mnt/win/shared
guest ok = yes
writeable = yes
create mode = 0666
directory mode = 0777
browseable = yes
public = yes
username = yzelle jeremy stefan jean
read list = yzelle jeremy stefan jean
write list = yzelle jeremy stefan jean
valid users = yzelle jeremy stefan jean


This allows any XP or Windows 7 user listed above (Yzelle, Jeremy, Stefan, Jean) in my LAN to access my Windows C:\shared folder while my machine is in Linux.

Additionally, as the above poster states, ensure that the folder you want to share on the Linux side has the correct permissions set (using chmod) to allow it to be readable (and writable, if you want) by those users listed.

Also note that the users above (Yzelle, Jeremy, Stefan, Jean) all exist as -Linux- users on my machine, and they must identify themselves as such on the Windows side by username and their Linux password, to get into my C:\shared (Windows-wise) folder. They can then read and write files in this folder.


The above config file also allows users if in Linux to access my C:\shared while I'm in Linux on my machine via this command on another Linux machine which has SAMBA client facilities installed, and a directory in the /mnt folder onto which to mount the shared folder:


mount -t cifs "//" /mnt/stefan_shared  -o username=jeremy,password="jeremy_password",uid=rylan,dirmode=0775,filemode=0775
e. g. on a Linux machine other than mine, user Jeremy can use the above in a BASH script to connect to my C:\shared on his Linux machine, and then read and write files in my C:\shared by going to /mnt/stefan_shared on his Linux machine, while in Linux.

Note that to make the above script work you need to create a mount point by doing


mkdir /mnt/stefan_shared
while logged in as root inside a terminal instance on the remote Linux machine.

Also note of course that I use NTFS-3G to read and write my Windows partition on which C:\shared is located (/mnt/win/shared from my internal Linux perspective), and I then share this NTFS-3G accessible directory out via SAMBA - it is a perfectly valid approach and works well.

NOTE: All the above of course assume your network is 100% correctly configured, you've actually got access between the machines ALREADY set up and 100% working, AND your firewall / SELinux instances have already been taken care of - e. g. only if you've already got all the -other- requirements sorted for a successful network connection, will the above work / be of assistance. The above won't mean much if your machines cannot talk among each other in the first place.

All times are GMT -5. The time now is 01:42 PM.