LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   samba server installed on fedora13 but but can't get access from other fedora and XP (https://www.linuxquestions.org/questions/linux-newbie-8/samba-server-installed-on-fedora13-but-but-cant-get-access-from-other-fedora-and-xp-880269/)

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://192.168.10.2
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 \\192.168.10.2\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*
samba-winbind-clients-3.5.2-60.fc13.i686
samba-swat-3.5.8-74.fc13.i686
samba-client-3.5.8-74.fc13.i686
samba-3.5.8-74.fc13.i686
samba-common-3.5.8-74.fc13.i686


and here is my smb.conf file

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

[global]
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

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

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

[smbshare]
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:

Code:


[global]

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

[shared]
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

FOR WINDOWS:

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.

FOR LINUX:

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:

Code:

mount -t cifs "//10.0.0.7/shared" /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

Code:

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.