Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a Synology Diskstation with a published windows share. On both the server and the client (Ubuntu 12.04) I have user accounts with matching username and passwords. (myth/myth)

The share is mounted with:

//192.168.88.1/plex  /mnt/plex  cifs  username=myth,password=xxxx  0  0

I can create, read and delete files on the share. I can't edit or overwrite them.

They get created as:

-rw-rw-r-- 1 1026 users  725178368 Mar 18 13:12

The server (Synology DiskStation, running DSM4.1, their own flavour of Linux) has a user called myth. The client (Ubuntu 12.04) has a user called myth. Both account have identical passwords.

So, it seems somehow I need to map uid 1026 to the user myth? How do I do that?

smb.conf from the DiskStation:

[global]
    printcap name=cups
    winbind enum groups=yes
    security=user
    local master=no
    realm=*
    passdb backend=smbpasswd
    printing=cups
    winbind enum users=yes
    load printers=yes
    workgroup=WORKGROUP
[plex]
    invalid users=nobody,nobody
    valid users=nobody,guest,admin,myth,nobody
    comment="Storage Location For PlexMediaServer"
    path=/volume1/plex
    guest ok=yes
    browseable=yes
    fileindex=yes
    mediaindex=no
    edit synoacl=no
    enable recycle bin=yes
    recycle bin admin only=no
    hide unreadable=no
    ftp disable list=no
    ftp disable modify=no
    ftp disable download=no
    read list=nobody,guest,nobody
    write list=nobody,admin,myth,nobody
    writeable=yes
share|improve this question
    
Also, when you get a chance, run sudo testparm /etc/samba/smb.conf and see if it reports any errors. –  BryceAtNetwork23 Mar 19 '13 at 14:25
    
Just wondering, but why is the "nobody" user listed as both an invalid and valid user...TWICE (in each list)? Also in the read/write access lists at the bottom. I'm thinking that you can get rid of that. –  BryceAtNetwork23 Mar 19 '13 at 14:33
    
Can't edit it, it's generated by the graphical interface. I mean, I probably could, but hell no I'm not going to. If it's wrong, I'll get Synology to fix their OS. That's what I paid for after all! –  RoboJ1M Mar 19 '13 at 17:58
    
Try comparing this smb.conf to the one that works, if you can. –  BryceAtNetwork23 Mar 19 '13 at 22:04
add comment

1 Answer

What you want to do is set up a Samba username map file.

In the [Global] section of your /etc/samba/smb.conf file, you can set the "username map" option to the location of the map file.

[global]
    username map = /pathToMapFile/usermap.txt

The usermap.txt (or whatever you want to call it) contains lines formatted in the style of mapTo = mapFrom. For example, if I wanted to make sure that my user on my Windows box could hit my Samba share on my Ubuntu machine, my usermap.txt file would have a line like this:

myUbuntuUserName = myWindowsUserName

Of course, to see these changes you'll need to restart the Samba service.

sudo service smbd restart

If you need extra help, check out the docs below. The official Samba documentation (below) demonstrates how to map multiple usernames to a single user, or even groups to users.

http://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html#USERNAMEMAP http://www.devshed.com/c/a/Administration/Handling-User-Accounts-in-Samba/1/

share|improve this answer
    
So it won't even auto map windows user myth to ubuntu user myth? –  RoboJ1M Mar 18 '13 at 20:05
    
And how would I refresh the config? Unmount and remount the share? Reboot? Is there a samba service to restart? –  RoboJ1M Mar 18 '13 at 20:11
    
Actually, that should work as long as the usernames and passwords are identical. There must be something else going on...could you edit your question with the share definition from your smb.conf? –  BryceAtNetwork23 Mar 18 '13 at 20:12
    
@RoboJ1M edit made for restart command. –  BryceAtNetwork23 Mar 18 '13 at 20:14
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.