LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Closed Thread
  Search this Thread
Old 11-08-2011, 10:55 AM   #1
Nerdio
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;

fredb:x:501:501:FredBLocal:/home/EU/fredb:/bin/bash


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;

[global]
log level = 10
workgroup = EU
server string = sectest server
realm = EU.MYDOMAIN.LOCAL
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 ==============================
[homes]
comment = Home Directories
browseable = no
writeable = yes
path = /home/%D/%u
valid users = %u
[printers]
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, 01:39 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,932

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
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:
http://www.linuxquestions.org/questi...apping-909112/
 
  


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 09:23 AM
Help the newbie to samba make it work. Shares are visible, connecting can not find.. Mysticle31 Linux - Networking 5 01-11-2008 12:43 AM
Howto make Samba work on Suse10.1 jadukor SUSE / openSUSE 2 10-10-2006 09:24 AM
pdf-gen - how to make it work with Samba? mangoo Mandriva 0 08-25-2005 05:53 AM
username map in samba robert.china Linux - Software 2 11-05-2003 09:47 PM


All times are GMT -5. The time now is 02:59 PM.

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