[Samba] username aliases?

D Parker drp at iest.hampshire.edu
Fri Dec 19 02:48:06 GMT 2008

On Thu, Dec 18, 2008 at 01:54:53PM -0800, wes wrote:
> On Thu, Dec 18, 2008 at 12:29 PM, D Parker <drp at iest.hampshire.edu> wrote:
> > On Thu, Dec 18, 2008 at 11:58:49AM -0800, wes wrote:
> >
> > > Is it possible to specify aliases for the username, so that a user can
> > > choose any 1 of several names to log in with?
> > >
> > > Like let's say we have my name as a username, "Wesley". But what I if I
> > want
> > > to be very lazy and only sign in with "wes"? And I would like to have the
> > > option of using either. And if I change any attribute of one alias, it's
> > all
> > > stored in the same place, so it should take effect for the other aliases.
> > > So, if I log in as "wesley" and change my password, I should be able to
> > log
> > > out and log back in as "wes" with the new password I set for "wesley".
> >
> > Hi Wes,
> >
> > Check out the "username map" parameter in the smb.conf man page -- it
> > should allow you to do exactly what you describe.
> >
> > Dan
> >
> Thanks for the tip. I have entered username map=/etc/samba/users.map into
> smb.conf, and this is the contents of users.map:
> wesley=wes
> but, I am unable to log in with "wes" - it gives me the authentication
> failed message. I have checked the logs, and it gives the same error as if I
> had entered an incorrect username.
> I'm sorry, but I failed to mention in my first post that I am using samba as
> a domain controller, with ldap integration. Will that break the username map
> functionality?

Hi Wes,

Forgive me if I'm stating the obvious, but make sure you restart Samba
after changing the configuration file.

Is the server you're authenticating to the domain controller or a domain
member server?  If it's the domain controller, the username map should
be applied before authenticating.  If it's a domain member, the map is
applied after the user has been authenticated by the domain controller.
I don't think the controller will apply its local username map in that
situation, though.


More information about the samba mailing list