4

Hi This is a repeat of this question on Superuser.

Since I didn't get any answers there, I've posted the question here hoping to get more answers since this is more Linux & Unix specific.

Hi I've tried solutions from similar questions but none of seem to solve the issue. Here's a short and crisp description of the problem.

Windows Client OS : Windows Server 2008 WORKGROUP : WORKGROUP

Linux Client OS : CentOS 6.4

AIM

To access a Samba share hosted by Linux Client from my Windows Client

ERROR

Windows cannot access \172.16.192.99\sambashare1

You do not have permission to access \172.16.192.99\sambashare1. Contact your network administrator to request access.

WHAT I'VE TRIED

Here's a snippet of my /etc/samba/smb.conf .

#======================= Global Settings =====================================

[global]
unix charset = UTF-8
# ----------------------- Network 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 = WORKGROUP
        server string = Samba Server Version %v

;       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 -----------------------------
.....
.....

# ----------------------- 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

# ----------------------- Domain Members Options ------------------------
#
...
...
[sambashare1]
path = /sambashare1
guest ok = yes
browseable = yes
write mode = 777
directory mode = 777
writable = yes
share modes = yes
Permissions on the directory

[root@localhost sambashare1]# ls -la /
total 114
....
drwxrwxrwx.   2 tester root  4096 Oct 20 05:53 sambashare1
Here's my /etc/smb/smbusers File

# Unix_name = SMB_name1 SMB_name2 ...
root = administrator admin tester
nobody = guest pcguest smbguest

I'm able to view the share on Windows but unable to access because of a permissions issue.

I have verified the following:

SELINUX is disabled Both Machines can PING Each other (that's why the share is visible in Windows Explorer) 3.I also did the following

Open the Run command and type "secpol.msc".

Press "continue" when prompted by Vista.

Click on "Local Policies" --> "Security Options"

Navigate to the policy "Network Security: LAN Manager authentication level" and open it.

By default Windows Vista sets the policy to "NTVLM2 responses only". Change this to "LM and NTLM – use NTLMV2 session security if negotiated".

Please give me the commands I need to run. This is purely for testing purposes so I can create a new user account on Linux or Windows if needed and modify smb.conf file as needed.

HERE'S WHAT I WANT

To be able to access the share without any restrictions. Anybody & Everybody should be capable of accessing it.

Thank You

UPDATE

My /etc/samba/smb.conf

#======================= Global Settings =====================================
[global]
workgroup = WORKGROUP
security = user
map to guest = bad password
#============================ Share Definitions ==============================
[MyShare]
path = /home/samba/share
browsable =yes
writable = yes
guest ok = yes
read only = no
available = Yes
create mode = 0644
directory mode = 0754
valid users = healy
force user = root

[Secure]
path = /home/samba/secure
guest ok = yes
writable = yes
create mask = 0664
browsable = yes
available = Yes
create mode = 0644
directory mode = 0754
valid users = healy
force user = root

I have even created user healy and root on the Windows System from where I'm trying to access. THese users on Windows have the same password that they have in Linux.

I can view Directory Structure, but I'm unable to create files or view any of the files

closed as off-topic by jasonwryan, Anthon, garethTheRed, Volker Siegel, Ramesh Oct 29 '14 at 14:00

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question has been posted on multiple sites. Cross-posting is strongly discouraged; see the help center and community FAQ for more information." – jasonwryan, Anthon, garethTheRed, Volker Siegel, Ramesh

1

Did you add the samba password for the users on the server?

For each user account you would want to be able to access the samba share, do this on the server:

smbpasswd -a username

It will then ask for a samba password. I usually make this the same as the user's system account password.

  • user's system account password ? Sorry for being a noob here but is that the Windows Administrator account ? – Dhiwakar Ravikumar Oct 29 '14 at 5:19
  • @DhiwakarRavikumar: The Linux server user account. You'll need to have a user account on both the Windows computer that is accessing the share, as well as the server. On the Linux server side, you'll have a user account, then you setup a samba password as well (that should ideally be the same password). Your Linux user account should be the same username and password as your Windows user account. – davehtaylor Oct 29 '14 at 5:32
  • Still doesn't work. Please see the edit to my answer and help me out. I'm really desperate. :( – Dhiwakar Ravikumar Oct 29 '14 at 6:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.