FedoraForum.org - Fedora Support Forums and Community
Results 1 to 9 of 9
  1. #1
    Join Date
    Sep 2009
    Location
    Namur
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Shares unavailables with samba 4.0.3

    Under fedora 18, I made a "yum update" and samba 4.0.2 was updated with samba 4.0.3.
    When i try to use a samba share , I receive this message
    Code:
    mount -t cifs //asus/scan /mnt/asus/scan/ -o username=vdm
    Password for vdm@//asus/scan:  ********
    mount error(13): Permission denied
    Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
    Same problem from a windows client asking continuously for password.

    I have replaced first samba 4.0.3 with samba 4.0.0 from fedora 18 repository and shares are available again.

    Samba 4.0.2 is no more available from fedora 18 repository.
    I have downloaded samba 4.0.2 from http://www.samba.org/ and samba 4.0.3 from fedora 18 source repository ( samba-4.0.3-1.fc18.src.rpm).
    Replacing samba-4.0.3.tar.bz2 with samba-4.02.tar.bz2 in SOURCE directory and modifying samba.spec in SPECS directory, then compiling with "rpmbuild -ba" ,I have obtained new samba 4.0.2 version.

    Then I reinstall samba 4.0.2

    Code:
    rpm -e --nodeps samba-client-4.0.3-1.fc18.x86_64 samba-libs-4.0.3-1.fc18.x86_64 samba-common-4.0.3-1.fc18.x86_64 samba-4.0.3-1.fc18.x86_64 libsmbclient-4.0.3-1.fc18.x86_64 libwbclient-4.0.3-1.fc18.x86_64
    rpm -i --nodeps samba-4.0.2-1.fc18.x86_64.rpm samba-client-4.0.2-1.fc18.x86_64.rpm samba-common-4.0.2-1.fc18.x86_64.rpm samba-libs-4.0.2-1.fc18.x86_64.rpm libsmbclient-4.0.2-1.fc18.x86_64.rpm libwbclient-4.0.2-1.fc18.x86_64.rpm
    cp /etc/sysconfig/samba.rpmsave /etc/sysconfig/samba
    cp /etc/samba/smb.conf.rpmsave /etc/samba/smb.conf
    And shares are available again.
    Last edited by Védéhème; 15th February 2013 at 09:38 AM. Reason: bad code

  2. #2
    Join Date
    Jan 2010
    Posts
    8,698
    Mentioned
    41 Post(s)
    Tagged
    0 Thread(s)

    Re: Shares unavailables with samba 4.0.3

    Yes, since upgrading, I've been unable to share from the Fedora 18 box, using AD authentication. So far, haven't found a solution, and the error, NT_STATUS_LOGIN_FAILURE, seems to be an error for various issues.

    As for being able to mount shares, I had been using the syntax -o username=DOMAIN/user. Changing that to user@DOMAIN has enabled me to once again mount Windows shares.

    I haven't had time to really try to troubleshoot--some hurried troubleshooting hasn't fixed the issue.

  3. #3
    Join Date
    Sep 2009
    Location
    Namur
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Shares unavailables with samba 4.0.3

    Have made some debugging:

    Share works in samba 4.0.3 with home's directory
    Code:
    [homes]
    	comment = Home Directories
    	browseable = yes
    	writable = yes
    	valid users = %S
    	valid users = Tourterelles\%S
    but not with all others directories like this
    Code:
    [SCAN]
    writable=yes
    path=/shares/internal/SCAN
    force user=lighttpd
    valid users=Marie_Therese Melissa vdm yves
    write list=Marie_Therese vdm yves
    read list=Melissa
    lighttpd is owner of /shares/internal/SCAN directory and is defined as ' guest account' in 'smb.conf' file.

    Debugging samba at level 3, and comparing 4.0.2 log with 4.0.3 , I see this in version 4.0.3 log:
    Code:
    [2013/02/19 15:24:01.065396,  3] ../source3/smbd/error.c:82(error_packet_set)
      NT error packet at ../source3/smbd/reply.c(927) cmd=117 (SMBtconX) NT_STATUS_ACCESS_DENIED
    Between version 4.0.2 and 4.0.3 ,changes have been made in source3/smbd/service.c
    Code:
    	/*
    	 * New code to check if there's a share security descripter
    	 * added from NT server manager. This is done after the
    	 * smb.conf checks are done as we need a uid and token. JRA.
    	 *
    	 */
    
    	create_share_access_mask(conn, snum);
    
    	if ((conn->share_access & FILE_WRITE_DATA) == 0) {
    		if ((conn->share_access & FILE_READ_DATA) == 0) {
    			/* No access, read or write. */
    			DEBUG(0,("make_connection: connection to %s "
    				 "denied due to security "
    				 "descriptor.\n",
    				 lp_servicename(talloc_tos(), snum)));
    			status = NT_STATUS_ACCESS_DENIED;
    			goto err_root_exit;
    		} else {
    			conn->read_only = True;
    		}
    	}
    	/* Initialise VFS function pointers */
    
    	if (!smbd_vfs_init(conn)) {
    		DEBUG(0, ("vfs_init failed for service %s\n",
    			  lp_servicename(talloc_tos(), snum)));
    		status = NT_STATUS_BAD_NETWORK_NAME;
    		goto err_root_exit;
    	}
    has been replaced by
    Code:
          /*
             * Set up the share security descripter
             */
    
    	status = check_user_share_access(conn,
    					conn->session_info,
    					&conn->share_access,
    					&conn->read_only);
    	if (!NT_STATUS_IS_OK(status)) {
    		goto err_root_exit;
    	}
    
    	/* Initialise VFS function pointers */
    
    	if (!smbd_vfs_init(conn)) {
    		DEBUG(0, ("vfs_init failed for service %s\n",
    			  lp_servicename(talloc_tos(), snum)));
    		status = NT_STATUS_BAD_NETWORK_NAME;
    		goto err_root_exit;
    	}
    This is probably why version 4.0.3 does not work.

    ---------- Post added at 06:30 PM ---------- Previous post was at 05:17 PM ----------

    Quote Originally Posted by Védéhème
    This is probably why version 4.0.3 does not work.
    I'm sure now.
    I have recompiled samba 4.0.3 , replacing only source3/smbd/service.c with service.c version from samba 4.0.2 . ... and it works fine.

  4. #4
    Join Date
    Jun 2009
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Shares unavailables with samba 4.0.3

    the problem I've been noticing along with this one is that files created on the server take several minutes to be communicated to the clients that they have updated. Bouncing the smb service is the only way to make it refresh. This is really broken. Trying the 4.0.2 solution listed here soon.

  5. #5
    Join Date
    Jun 2009
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Shares unavailables with samba 4.0.3

    I see there is a 4.03-2 samba fc18 now. Are the issues resolved on that version?
    thanks

  6. #6
    Join Date
    Sep 2009
    Location
    Namur
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Shares unavailables with samba 4.0.3

    Quote Originally Posted by kevins7189
    I see there is a 4.03-2 samba fc18 now. Are the issues resolved on that version?
    thanks
    Nothing has been changed since 4.0.3 in source3/smbd/service.c .
    The problem is in that piece of code.
    Common shares doesn't work due to bad user management in samba.

    I don't use AD , only Workgroup .
    Some key configuration parameters:
    Code:
    [global]
    	workgroup = Tourterelles
    	server string = Samba 
    	netbios name = asus
    	security = user
            passdb backend = smbpasswd
            smb passwd file=/var/private/smbpasswd
    guest account=lighttpd
    create mask = 755

  7. #7
    Join Date
    Jan 2010
    Posts
    8,698
    Mentioned
    41 Post(s)
    Tagged
    0 Thread(s)

    Re: Shares unavailables with samba 4.0.3

    For what it's worth, I've linked to this thread on the bugzilla announcement about samba-4.0.3.

    https://bugzilla.redhat.com/show_bug.cgi?id=747903

    As someone else affected, I want to thank you for your research into it.


    EDIT

    Sigh, reported it in the wrong place. Trouble is, I have no time on this workstation, to investigate.
    Last edited by smr54; 1st March 2013 at 06:30 PM.

  8. #8
    Join Date
    Sep 2009
    Location
    Namur
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Shares unavailables with samba 4.0.3

    Many Thanks to SMR54 .

    Seeing this thread, Norman Gaywood says that "this is simply a change of behaviour".
    I don't like the "simply" because my samba management program must be changed but , il works with this configuration, adding 'force user' username to valid users.
    Code:
    [SCAN]
    writable=yes
    path=/shares/internal/SCAN
    force user=lighttpd
    valid users=lighttpd Marie_Therese Melissa vdm yves
    write list=Marie_Therese vdm yves
    read list=Melissa

  9. #9
    Join Date
    Jan 2010
    Posts
    8,698
    Mentioned
    41 Post(s)
    Tagged
    0 Thread(s)

    Re: Shares unavailables with samba 4.0.3

    That's the Linux way make a fairly useless change to break configuration, and when people complain about Samba being broken, they'll be told they should have googled till they found it. So, how does one use forceuser with security=ads? (Rhetorical question, about to google and see if this fixes the issue. Meanwhile, transferred the share to a Debian server.

    Also, in fairness, I have no idea about the reason for the change, and it's possible it has some use, so my grumbling may be completely unjustified--but it's the sort of change that the samba folks, or whoever decided to do it, should make more effort to publicize.


    EDIT. Well, doing force user = @DOMAIN+"Domain Users" is not working.
    I don't have more time to put into this, will just use Debian for this purpose at present.
    Last edited by smr54; 1st March 2013 at 09:01 PM.

Similar Threads

  1. [SOLVED] SAMBA - no access on samba shares (FC17)
    By Otchum in forum Servers & Networking
    Replies: 0
    Last Post: 17th November 2012, 02:48 PM
  2. Replies: 1
    Last Post: 1st October 2010, 06:08 PM
  3. Samba Shares Some Help Please
    By john_h in forum Servers & Networking
    Replies: 5
    Last Post: 14th May 2006, 10:26 AM
  4. Samba: Windows boxes can't access my FC2 Samba shares
    By iontyre in forum Servers & Networking
    Replies: 13
    Last Post: 26th October 2004, 04:49 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •