Bug 497633

Summary: Samba creates all files in share as user root
Product: [Fedora] Fedora Reporter: Joost Ruijsch <joost>
Component: sambaAssignee: Simo Sorce <ssorce>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: low    
Version: 9CC: gdeschner, ssorce
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-14 16:32:26 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:

Description Joost Ruijsch 2009-04-25 11:35:08 UTC
Description of problem:

Samba creates all files in share as user root!
Even when [share] is defined with
user = john
force user = john
etc...



Version-Release number of selected component (if applicable):
samba-3.2.11-0.28.fc9.i386

How reproducible:
very

Steps to Reproduce:
1. Create file in share using smb client and check ownership
2.
3.
  
Actual results:
$ ls -l

-rwxrw-r-- 1 root  john       0 2009-04-25 13:04 New Text Document.txt


Expected results:
$ ls -l

-rwxrw-r-- 1 john  john       0 2009-04-25 13:04 New Text Document.txt


Additional info:
Problem started this morning since new update was installed by yum. Previous versions did not have this problem.

Comment 1 Guenther Deschner 2009-04-27 13:16:23 UTC
Can you please post your full smb.conf file ?

Comment 2 Joost Ruijsch 2009-04-27 14:34:20 UTC
I tried to reduce my smb.conf to the bare minimum, but even with the one below the problem persists. I have checked using two XP client machines.

[global]
 workgroup = WORKGROUP
 netbios name = SAMBA
 server string = Samba Server
 bind interfaces only = true
 interfaces = 10.5.0.1 127.0.0.1
 security = share
 encrypt passwords = yes
 smb passwd file = /etc/smbpasswd

[joost]
 comment = Joost Home
 path = /home/joost/smb
 writable = yes
 user = joost

Comment 3 Joost Ruijsch 2009-04-27 15:09:11 UTC
I just discovered something in log.smbd:

[2009/04/27 16:25:36,  0] smbd/server.c:main(1210)
  smbd version 3.2.11-0.28.fc9 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2009
[2009/04/27 16:25:42,  1] smbd/service.c:make_connection_snum(1194)
  acerone (10.5.0.125) connect to service joost initially as user joost (uid=0, gid=500) (pid 1776)
[2009/04/27 16:30:07,  1] smbd/service.c:make_connection_snum(1194)
  desktop (10.5.0.99) connect to service joost initially as user joost (uid=0, gid=500) (pid 1790)

According to this, user joost has same uid as root (uid=0).

/etc/passwd says I have uid 500.

/etc/samba/smbusers:
# Unix_name = SMB_name1 SMB_name2 ...
root = administrator admin
nobody = guest pcguest smbguest

I tried commenting the "root =" line, and recreating /etc/smbpasswd, but still no luck.

If every smb user is suddenly promoted to root in this samba version, then any user could access and modify any file! Fortunately, its just my private server..

Comment 4 Bug Zapper 2009-06-10 03:41:00 UTC
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 5 Bug Zapper 2009-07-14 16:32:26 UTC
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.