Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have 2 ubuntu 8.04 LTS fileservers running samba version 3.0.28a-1ubuntu4.12, they export samba shares for windows server 2003 machines. There is no windows AD domain, just plain user authentication. From /etc/samba/smb.conf:

[global]
        workgroup = WORKGROUP
        security = SHARE
        passdb backend = smbpasswd:/etc/samba/smbpasswd
        unix password sync = no
        syslog = 0
        log file = /var/log/samba/log.%m
        max log size = 1000
        dns proxy = No
        panic action = /usr/share/samba/panic-action %d
        encrypt passwords = true
        invalid users = root
        hosts allow = 10.1.1.0/24

[md0]
        comment = md0
        path = /mnt/md0/smb/share1
        valid users = user1
        force user = root
        force group = root
        read only = no
        create mask = 0660
        directory mask = 0770
        browseable = Yes

/mnt/md0/ is a raid system and file permissions are root.root for historical reasons.

On a windows server 2003 machine we access the share with a script:

net use t: \\fileserver0\md0 passwordforuser1 /user:user1

On the windows machine we now see Unix user\root as the owner:

alt text

This is logically correct.

But is there a chance to change samba configuration so we see user1.user1 as owner on the windows side instead of Unix user\root?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

First, You could adjust the groupmappings in samba, to adjust the group that will be shown :

net groupmap add unixgroup=root ntgroup=user1

Second, You can map individual users by modifying samba.conf by adding

username map = /etc/samba/smbusers

to the [global] section, and then making the file /etc/samba/smbusers containing :

root: user1
share|improve this answer
    
Thank you. It works for the group but the user that windows sees is still root. –  mit Aug 23 '10 at 16:06
    
I tried to change the last line to root = user1. Now there is an error on the winodws side when user1 tries to connect. Is there anything more I need to change? Maybe the forcestatement or something in the samba config needs more tweaking? –  mit Aug 23 '10 at 16:17
    
Do you have any relevant logs on your server about this error? –  Jasper Aug 23 '10 at 17:15
    
I had a look at the logs and could solve it. I had forgotten to update the password with smbpasswd. Thank you. –  mit Aug 27 '10 at 13:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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