LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-22-2014, 04:16 PM   #1
PandaMindset
LQ Newbie
 
Registered: Apr 2010
Posts: 3

Rep: Reputation: 1
Can't access my samba share: Permissions denied.


Background: This is a repost that I wrote on reddit/r/linuxquestions. Unfortunately no one was able to help me with this problem. So I thought I should try and see if any of you peple have any suggestions. I've tried almost everything that the internet and I could come up with and I'm seriously hoping that someone out there knows what might be causing this error.

I'm currently working on setting up a file server at home. The computer is running Centos 7.0.1406 (Core) with Samba package 'Samba-4.1.1-37.el7_0.x86_64'. The file servers NetBIOS/hostname is 'athenaeum'.

The computer from which I intend to access this file server runs Windows 7 x64 Home Premium.

Configuration info:

My samba conf (/etc/samba/smb.conf)

Code:
[global]

        workgroup = WORKGROUP
        server string = Athenaeum - Samba Server, version %v

        netbios name = athenaeum

        security = user
        map to guest = never



[athenaeum]

        comment = athenaeum
        writeable = Yes
        valid users = @samba
        path = /mnt/athenaeum
        browseable = yes

        create mask = 0750
        directory mask = 0750
        force create mode = 0750
        force directory mode = 0750
        force group = samba

        inherit permissions = yes
The account 'max' has been set up as a samba user. 'samba' is the name of the samba group.

Code:
[max@athenaeum ~]$ ll /mnt/
total 8
drwxr-x---. 4 max  samba 4096 Sep 21 00:24 athenaeum
drwxr-xr-x. 5 root root  4096 Aug 23 14:30 backup
And of course, I've restarted the service on multiple occasions.

Problem: Whenever I try to access this share I am presented with two different error messages:

#1:
Quote:
"Z:\ is not accessible. Access is denied." Despite the fact that it shows up as a green/okay network share.
http://imgur.com/3gX2Ip7

#2:
Quote:
"The network folder specified is currently mapped using a different user name and password. To connect using a different user name and password, first disconnect any existing mappings to this network share."
http://imgur.com/BxzOimU

Please note, that I have done so. I've run all kinds of variations of net use, including C:\net use /delete * And later remapped it again. No success. I've tried connecting to both hostname and directly to the IP-address. Switched of firewalld. Still didn't work. Iptables is installed by default but no daemon seems to be running.

What I've tried so far:

1. A common problem that might occur is that Windows uses the wrong type of NTLM authentication than the one that Samba uses. It is possible to force windows to use NTLM v.1 through local GPO's but Home Premium does not include the local gpo editor. I've tried the regedit-hack where you change the registry-entry “HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\LMCompatibilityLevel”

I've tried changing it to "1" (Clients use LM and NTLM authentication, and they use NTLMv2 session security if the server supports it. Domain controllers accept LM, NTLM, and NTLMv2 authentication.)

And I've tried changing it to "2" Clients use only NTLM authentication, and they use NTLMv2 session security if the server supports it. Domain controller accepts LM, NTLM, and NTLMv2 authentication.

No luck.

2. I tried setting up a virtual machine in Oracle's Virtual Box, running Windows 7 x64 Professional and in this machine, through the local gpo editor, I edited the NTLM Compatibility Levels to the ones compatible with samba. STILL didn't work. By now I'm running out of ideas.

3. Also note: I've tried to connect to it by entering the following variations in the user authentication window that my windows machine throws at me:

Username: 192.168.20.2\max Password: *********

Username: max@192.168.20.2 Password: *********

Username: max Password: *********

4.And I've also tried with another user account that was setup as a samba user, yet no success.

5.Changed password of linux/samba-user 'max' with smbpasswd. (smbtool is not installed on my system appearantly, should it be?)

With my newly changed sambapassword I tried to reconnect the share, this time the parameter for valid users was set as. valid users = max Nope. Still not working.

I changed the map to guest = none to map to guest = bad user (allow guest logons if no credentials entered). I also commented out valid users. Did not work.


All and all, no matter what I do, the log kees showin me the following:

Code:
STATUS=daemon 'smbd' finished starting up and ready to serve connectionsFailed to delete pidfile /run/smbd.pid. Error was No such file or directory

[2014/10/20 23:23:57,  0] ../source3/smbd/server.c:1198(main)
  smbd version 4.1.1 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2013

[2014/10/20 23:23:57.557082,  0] ../source3/smbd/server.c:1278(main)
standard input is not a socket, assuming -D option

[2014/10/20 23:23:57.595802,  0] ../lib/util/become_daemon.c:136(daemon_ready)
STATUS=daemon 'smbd' finished starting up and ready to serve connectionsUnable to     connect to CUPS server localhost:631 - Transport endpoint is not connected
STATUS=daemon 'smbd' finished starting up and ready to serve connectionsfailed to retrieve printer list: NT_STATUS_UNSUCCESSFUL

[2014/10/20 23:24:57.650572,  0] ../source3/printing/print_cups.c:151(cups_connect)
Unable to connect to CUPS server localhost:631 - Transport endpoint is not connected

[2014/10/20 23:24:57.651385,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL

It'd be very nice if someone could help me? Is there something that I've missed?
 
Old 10-23-2014, 02:11 AM   #2
dubnik
Member
 
Registered: Dec 2006
Location: Slovakia
Distribution: Red Hat
Posts: 48

Rep: Reputation: 1
Hi

do you have disabled SElinux ?
 
1 members found this post helpful.
Old 10-30-2014, 02:41 PM   #3
PandaMindset
LQ Newbie
 
Registered: Apr 2010
Posts: 3

Original Poster
Rep: Reputation: 1
It totally worked, man!!

THANK YOU SO MUCH! I've been troubleshooting this problem for weeks!

This config file for SELinux solved the problem:
Code:
[root@host2a ~]# cat /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
SELINUX=permissive
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted

# SETLOCALDEFS= Check local definition changes
SETLOCALDEFS=0
 
1 members found this post helpful.
Old 04-04-2015, 07:50 PM   #4
doneDad
LQ Newbie
 
Registered: Aug 2014
Location: Colorado
Distribution: CentOS 6.5
Posts: 4

Rep: Reputation: Disabled
Smile Solved several issues

This fix solved all of my Samba problems which I have been wreslting with for days. In addition to share permission problems, it also solved problems with getting the nmb service up and running, and stay up and running.

Many many thanks for the solution. This issue should be marked SOLVED!!!
 
  


Reply

Tags
centos, ntlm, samba, smb, smbconf


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
samba share access denied error PlorkZ Linux - Server 5 10-08-2012 12:52 AM
Samba PDC Share access denied Issue sivaa1 Linux - Newbie 0 04-05-2012 03:05 AM
Samba Share = Network Access is Denied surban99 Linux - Software 2 04-10-2009 01:54 PM
Access denied when attempting access samba share warlockvix Linux - Software 1 05-11-2007 02:36 PM
Very stupid, but here we go: pam_mount + samba share = access denied? Thakowbbery Linux - Software 8 05-23-2005 10:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:44 AM.

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