Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


Closed Thread
  Search this Thread
Old 11-08-2011, 09:55 AM   #1
LQ Newbie
Registered: Sep 2011
Posts: 27

Rep: Reputation: Disabled
Cannot make 'username map' to work with Samba

I have configured Samba to work with our Win 2003 R2 PDC using AD. That all works fine.

However, because our existing Linux server has a lot of users already configured, and those user names also exist on other servers (and scripts dynamically pick up the user name)then I have a problem. The problem is this; the domain name for a user Fred Bloggs is bloggsf, but Fred has a Linux account (and home dir) for the name fredb.

I believe I should be able to use "username map", and smbusers to map bloggsf to fredb.

I have configured this in smb.conf,

username map = /etc/samba/smbusers

Then in smbusers, I have this;

fredb = bloggsf

But when I login as bloggsf, I am authenticated OK, but the system complains it cannot find a home dir of /home/EU/bloggsf. This is because I have not created one, because I want it to use /home/EU/fredb.

Note, I have configured a user locally thus;


I really hoped, and expected that "username map" would make bloggsf appear as user fredb once logged in, but it appears not. If I run 'id' from the command line, I am still very much bloggsf.

My smb.conf looks like this;

log level = 10
workgroup = EU
server string = sectest server
log file = /var/log/samba/%m.log
max log size = 50
security = ADS
password server = MY-PDC.EU.MYDOMAIN.LOCAL
username map = /etc/samba/smbusers
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = no
idmap uid = 10000-20000
idmap gid = 10000-20000
template shell = /bin/bash
winbind use default domain = yes

#============================ Share Definitions ==============================
comment = Home Directories
browseable = no
writeable = yes
path = /home/%D/%u
valid users = %u
comment = All Printers
path = /var/spool/samba
browseable = no
printable = yes

My smbusers file looks like this;

# Unix_name = SMB_name1 SMB_name2 ...
root = administrator admin
nobody = guest pcguest smbguest
fredb = EU/bloggsf

I am also running windbindd, and have some PAM modules configured, which I believe is what I need to have done.

I am fairly new to this level of server admin, so can only assume that I have done everything correctly so far.

I am sure it is something simple that is missing, so if somebody could help me I would be most grateful.

Thanks in anticipation
Old 11-08-2011, 12:39 PM   #2
Registered: Aug 2002
Posts: 16,014

Rep: Reputation: 1848Reputation: 1848Reputation: 1848Reputation: 1848Reputation: 1848Reputation: 1848Reputation: 1848Reputation: 1848Reputation: 1848Reputation: 1848Reputation: 1848
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

Continue here:

Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Cannot make my SAMBA WORK ON FC13 tr1pl3x Linux - Newbie 7 07-19-2010 08:23 AM
Help the newbie to samba make it work. Shares are visible, connecting can not find.. Mysticle31 Linux - Networking 5 01-10-2008 11:43 PM
Howto make Samba work on Suse10.1 jadukor SUSE / openSUSE 2 10-10-2006 08:24 AM
pdf-gen - how to make it work with Samba? mangoo Mandriva 0 08-25-2005 04:53 AM
username map in samba robert.china Linux - Software 2 11-05-2003 08:47 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:01 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration