LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-01-2006, 10:36 AM   #1
cucolin@
Member
 
Registered: Nov 2003
Location: USA
Distribution: Ubuntu, CentOS, RedHat
Posts: 416

Rep: Reputation: 31
Question Samba NOT allowing access to folders


Hello all!, maybe we all can learn from this thread as I will write all the steps I have taken so far in order to set up Samba here at work for File server purposes. This is the first time I touch Samba, sorry for any misunderstandings.

I'm testing this in a computer lab with a workgroup called: Lab

This my smb.conf file:

#Global Parameters

workgroup= Lab
netbios name= Samba
security= SHARE
#encrypt passwords= yes

[homes]
read only= no
browseable= no

[music]
path= /data/mp3
browseable= yes
write list= xrgm, gts18,rguisbert

[everyone]
path= /data/everyone
read only= no
browseable= yes

[apps]
path= /data/apps
browseable= yes
valid users= @admins, root
write list= @admins, root

This is what happens with this command:
xrgm@XubuntuLab:/etc$ sudo netstat -plant | grep LISTEN
tcp 0 0 127.0.0.1:4228 0.0.0.0:* LISTEN 4181/hpiod
tcp 0 0 127.0.0.1:1638 0.0.0.0:* LISTEN 4184/python
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 5133/smbd
tcp 0 0 0.0.0.0:1458 0.0.0.0:* LISTEN 5182/nc
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 4746/cupsd
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 5133/smbd
tcp6 0 0 :::22 :::* LISTEN 4506/sshd

This is what happens when I add smbclient:
By using the command: smbclient -U rguisbert -L SAMBA

Domain=[LAB] OS=[Unix] Server=[Samba 3.0.22]

Sharename Type Comment
--------- ---- -------
music Disk
everyone Disk
apps Disk
IPC$ IPC IPC Service (Samba 3.0.22)
ADMIN$ IPC IPC Service (Samba 3.0.22)
Domain=[LAB] OS=[Unix] Server=[Samba 3.0.22]

Server Comment
--------- -------
LAB4 Computer Lab
SAMBA Samba 3.0.22

Workgroup Master
--------- -------
LAB LAB4

When I try to access the folder apps from my WinXP machine I get a prompt:

user: \\Samba\gwguest
password:

There is no username gwguest in my WinXP machine or in the Linux box! I tried many password and nothing

When I try to access the folders everyone and music from my WinXP machine I get:

\\Samba\music is not accessible. You might not have permission to use this network resource. Contact the network administrator of this server to find out if you have access permissions.

Same case for the everyone folder.

I did:
1. Restart Samba
2. sudo useradd rguisbert
3. sudo smbpasswd -a rguisbert

And repeated this for all users. What is the problem?? We want to make a swicth to Linux but it seems very confusing!!

thanks...
 
Old 11-01-2006, 11:19 AM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
Hi

This might not be exactly what you want, but the following smb.conf with Samba 3.0.20a on FC3 with a 2.6.14.3 kernel allows all windows machines on my LAN to access my Linux machine's defined share without having the windows users having to type passwords or anything:

[global]

netbios name = stefan
workgroup = GOEDEHOOP10
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 = 169.254.255.10 169.254.255.11 169.254.255.20 169.254.255.30 127.0.0.1 169.254.255.40 169.254.255.50 169.254.255.60 169.254.255.70 169.254.255.80
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

Try it and see if it helps? You'll of course just need to substitute your infomation as applicable.
 
Old 06-30-2007, 01:34 PM   #3
pablom
LQ Newbie
 
Registered: Dec 2006
Posts: 13

Rep: Reputation: 0
I have a similar problem, and I tried the solution you suggested but I still Samba won't allow access to folders.
When I try to access to my shared folders from a Win98 or a WinXP or a Windows Vista, I get an error message that says that I have no permission, or that the folder can't be accessed.

I copy my smb.conf here. Maybe you can give me a hint?

-----------------------
[global]
workgroup = LOSMONTE
netbios name = PABLO
server string = Compu de pablo
log file = /var/log/samba.log
max log size = 500
log level = 2
hosts allow = 192.168.1.2 127.0.0.1 192.168.1.3 192.168.1.4 192.168.1.5 192.168.1.6
security = share
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=16384 SO_RCVBUF=16384
local master = yes
os level = 99
preferred master = yes
domain logons = no
wins support = yes
browseable = yes
lanman auth = yes
lm announce = yes

[Incoming]
comment = Musica de Pablo
case sensitive = no
guest ok = yes
;msdfs proxy = no
path = /home/pablo/Incoming
read only = yes
browseable = yes
public = yes

[ACER]
comment = Musica de Mariana
guest ok = yes
path = /home/pablo/Desktop/ACER
browseable = yes
writeable = yes
create mode = 0666
directory mode = 0777
public = yes
 
Old 07-02-2007, 10:27 AM   #4
spamgrind
LQ Newbie
 
Registered: Jul 2007
Posts: 10

Rep: Reputation: 0
I have found in the past that alot of my access problems with Samba where not due to Samba's configuration, but because of how SELinux is configured out of the box in Fedora 6 if you are using Red Hat. If you are not using SELinux you should check what your distro is using. In any case, in Fedora, you can configure SELinux via the control panel to allow samba through. Once that configuration is in place, most Samba access problems go away.
 
Old 07-03-2007, 03:51 PM   #5
pablom
LQ Newbie
 
Registered: Dec 2006
Posts: 13

Rep: Reputation: 0
My distro is Gentoo, and I manually configured my kernel. I am quite sure that SELinux is not installed on my system.

Should I manipulate /etc/samba/lmhosts ? Or /etc/hosts ?

I even tried configuring Samba with the SWAT tool, but it was useless.
 
Old 07-03-2007, 04:54 PM   #6
spamgrind
LQ Newbie
 
Registered: Jul 2007
Posts: 10

Rep: Reputation: 0
Have you tried to configure security for USER instead of SHARE. Then use SWAT to add users to your SMB configuration (restart). You can also make all of this transparent between your Win boxes and your samba server if the usernames/password across both are the same.
 
Old 07-04-2007, 01:25 AM   #7
pablom
LQ Newbie
 
Registered: Dec 2006
Posts: 13

Rep: Reputation: 0
Yep. I finally did it. Thanks for the tip, but I read your reply when I had already solved my problems. I had to create UNIX users, and smb users, and resolve their permissions, etc.

Thanks, anyway.
 
  


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
allowing rsh access uerden Linux - Networking 5 11-08-2006 02:15 PM
Samba can create new files and folders but access denied in any new folders k.king Linux - Networking 2 01-15-2006 06:14 AM
Allowing only SFTP access vanibhat Linux - Enterprise 8 06-30-2005 02:10 AM
Allowing user access to one directory only aje Slackware 5 05-25-2005 08:12 PM
group access for specic folders in samba fidelis Linux - Networking 0 09-20-2004 03:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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