Bug 204240

Summary: Samba 3.0.23a is completely broken
Product: [Fedora] Fedora Reporter: Andrew Zabolotny <anpaza>
Component: sambaAssignee: Simo Sorce <ssorce>
Status: CLOSED CURRENTRELEASE QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: medium    
Version: 5CC: bugzilla, christopher.murtagh, jmoore, jplans
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 3.0.23c-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-03-23 21:10:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
sabma-server-log (client) none

Description Andrew Zabolotny 2006-08-27 15:15:51 UTC
Description of problem:

I have upgraded to samba-3.0.23a-1.fc5.1 from fc5-updates repository. Now I
cannot access any files mounted on another Linux box via 'mount.cifs'. It looks
like this:

[2|root@zap|/mnt/tmp]cat ls_lR.bz2 
cat: ls_lR.bz2: Permission denied

although this file is on a public share and has 'a+r' anyways. Writing files to
directories with respective permissions works, reading ANY files doesn't work.

Version-Release number of selected component (if applicable):
3.0.23a

How reproducible:
Always

Steps to Reproduce:
1. Install samba 3.0.23a
2. Append this section to smb.conf:

[ftp]                                                                          
          
    path = /var/ftp                                                            
          
    public = yes                                                               
          
    writable = yes                                                             
          

3. Add a guest user without password: "smbpasswd -a guest".

4. Try to access the share via smbclient:

smbclient //127.0.0.1/ftp -U guest

This works as expected and you can retrieve via 'get' any files.

5. Now try to mount same share somewhere:

mount.cifs //127.0.0.1/ftp /mnt/tmp -o user=guest

 
Actual results:

cat /mnt/tmp/some-file
cat: /mnt/tmp/some-file: Permission denied

At the same time writing a file to a subdirectory with appropiate permissions
(e.g. /mnt/tmp/incoming) works as expected.


Expected results:

The files should read ok.

Additional info:

This bug has been confirmed on x86_64 with Fedora Core 4 with latest updates, on
another x86_64 with Fedora Core 5 with latest updates, and on a i386 with Fedora
Core 5 with all latest updates.

The only known to me workaround is to downgrade to samba from distribution.

Comment 1 Wayne Carruthers 2006-09-06 14:48:50 UTC
Also encountered problems as above on an FC4 Server with upgrade to this samba
version

Upgraded to FC5 & initially found I had to uninstall samba, remove config files
& samba users & re install samba from scratch, initially also had to separate
samba users from unix users

Still suffering intermitant network pauses and "windows delayed write failures"
on XP Pro workstations & "network drive no longer available" on 98 workstations

Funny thing is the errror message can be given & then the file write or copy etc
can be seen to complete ok

Seems it is a timing issue ???



Comment 2 Wayne Carruthers 2006-09-06 14:50:30 UTC
Also encountered problems as above on an FC4 Server with upgrade to this samba
version

Upgraded to FC5 & initially found I had to uninstall samba, remove config files
& samba users & re install samba from scratch, initially also had to separate
samba users from unix users

Still suffering intermitant network pauses and "windows delayed write failures"
on XP Pro workstations & "network drive no longer available" on 98 workstations

Funny thing is the errror message can be given & then the file write or copy etc
can be seen to complete ok

Seems it is a timing issue ???

Comment 3 Christopher Murtagh 2006-09-08 15:45:38 UTC
I found a patch that resolves this bug (at least it solves it on my box). I
found it on the samba list, applied it and modified the spec file. The patch can
be found here:

http://lists.samba.org/archive/samba/2006-August/123664.html

Can someone please look into it and apply it if it's ok. Like I said, the
problem is resolved on my box, but it would be nice to be running the same
version as upstream.

Comment 4 Jack Tanner 2006-09-13 03:02:51 UTC
I experienced similar issues. Specifically, the Windows XP SP2 box mounting the
Samba share would time out on file copies and complain "the specified network
name is no longer available". (Nonetheless, the drive remained mounted and could
be browsed.)

I downloaded the samba-3.0.23c-2.src.rpm from soon-to-be-FC6 rawhide, and built
and installed the RPMS on the FC5 samba server. Bye-bye problems.

Comment 5 James J. Moore 2006-09-25 13:17:28 UTC
I had the same problem as well.  Client and server running samba-3.0.23a-fc5.  
Older Samba clients do not have the problem.  Running the server with log 
level = 3 revealed that the server tried to pull up the client user's SID and 
ended up with his username instead.  This looks suspiciously like the bug 
fixed in Samba 3.0.23 (See bug #199148), but in a different context.  In any 
case, I took Jack's suggestion in Comment #4 and that fixed the problem.

Comment 6 Christopher Murtagh 2006-09-25 13:46:20 UTC
I'm pretty dissapointed in the speed that this bug is being addressed. The worst
part is that it affects my FC boxes only. There are now two fixes in the
comments (the patch and the rawhide src.rpm), why can't someone fix this in the
distro?

Comment 7 Christopher Murtagh 2006-09-27 12:54:13 UTC
Problem seems fixed in 3.0.23c-1.fc5 on my FC5 i386 and FC5 x86_64 boxes. Thanks
very much Jay!


Comment 8 Steve 2006-09-28 21:39:47 UTC
The promlem is NOT fixed in version 3.0.23c-1. In Version 3.0.23a write
permission was gone, in version 3.0.23c-1 the mount permission is also gone.
samba works if you are runnig clients on 3.0.23a and servers on 3.0.23.

Comment 9 Steve 2006-09-28 21:42:12 UTC
The promlem is NOT fixed in version 3.0.23c-1. In Version 3.0.23a write
permission was gone, in version 3.0.23c-1 the mount permission is also gone.
samba works if you are runnig clients on 3.0.23c-1 and servers on 3.0.23.

Comment 10 Steve 2006-11-12 09:29:18 UTC
Created attachment 140982 [details]
sabma-server-log (client)

Comment 11 Steve 2006-11-12 09:31:34 UTC
ok, i want to describe the problem when installing 3.0.23c-1 on a 64-bit machine.

- installation from the rpm: no problem
- testparm /etc/samba/smb.conf: OK
- when trying to mount the share from the client there is an error in the log: 
  "no such user" (may be samba deleted the user?)
- adding the user again
- when trying to mount the share again, there is another error in the log: (see
atachment)

Comment 12 Steve 2006-11-12 09:50:12 UTC
and here is the solution:


if you have a "@" in your smb.conf e.g: write list = @group, replace it with a
"+". this solves the problem.

Comment 13 James J. Moore 2006-12-15 19:52:22 UTC
With kernel 2.16.18-1.2239 and Samba 3.0.23c-1 on one client and server, 
everything worked.  The same combination on another client/server pair led to 
a "Permission denied" on the client and the following log on the server:  
Dec  1 17:11:57 cyclops smbd[2126]:   domain_client_validate: unable to 
validate
 password for user 潭牯e䥃卆䱟义塕䑟䵏䰀湩硵瘠牥楳湯㈠㘮ㄮⴸ⸱㈲㤳昮㕣䌀䙉⁓�
                                                                          ⁓汃敩 
瑮映牯䰠湩硵 in domain EVANSCITY to Domain controller GARRISON.THEBANK.C
OM. Error was NT_
Huh?
I can also mount shares on servers running any earlier version of Samba. When 
attempting to mount a Windows 2003 Server SP1 share, I get a "Permission 
denied" error.  Checked the server event viewer and found that mount.cifs was 
not pulling domain information from smb.conf, but supplied a 
default 'CIFS_LINUX_DOM.'  If I specified the domain in the mount options, 
everything worked.  All the Samba clients and servers are using LDAP via 
nss_ldap for user resolution.

Comment 14 Steve 2007-02-11 09:12:21 UTC
(In reply to comment #12)
> and here is the solution:
> 
> 
> if you have a "@" in your smb.conf e.g: write list = @group, replace it with a
> "+". this solves the problem.

The problem is NOT fixed in samba version 3.0.24-1.fc6!

Comment 15 Simo Sorce 2007-03-23 21:10:53 UTC
Steven you hijacked the original bug with a known glibc bug in FC5.

I am closing this bug as the original bug is fixed.

If you still have the nisplus related crash problem after a full update of the
distribution (or at least all libc related packages) please file a new bug
against glibc.