Operating System - HP-UX
1820213 Members
3699 Online
109620 Solutions
New Discussion юеВ

Re: Is it possible to map multiple users to multiple unix ids?

 
Geoff Wild
Honored Contributor

Is it possible to map multiple users to multiple unix ids?

I have many samba shares (Using HP's CIFS based on samba 2.28a).

Most of the users do NOT have unix ids...so I map those to a genreic id.

What I need to do, is allow someone to be mapped to 2 or more unix id's.

IE, in username.map:

hrprd = user1, user2, user3
hrqa = user3, user4

Then in the share I have:

[hrprd]
valid users = hrprd

[hrqa]
valid users = hrqa


What happens is, user3 trys to acces hrqa share - and it fails:

[2004/10/13 11:18:55, 2] smbd/service.c:(331)
Invalid username/password for hrqa [hrprd]

So, it looks like user3 is matched only to the first occurance of user3 in username.map.

Any work arounds?

Rgds...Geoff





Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: Is it possible to map multiple users to multiple unix ids?

Don't know why it happens. Here is our workaround.

We have an os user called

issapps

We do smbpasswd -a issapps password

Distribute the user id and password to authorized users.

Many users whether or not they have unix id's can access shares authorized for this user.

We don't set authorized users on shares. We controll access with permissions, user groups and such.

It kinda gets around the issue. If I understand it.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Geoff Wild
Honored Contributor

Re: Is it possible to map multiple users to multiple unix ids?

Interesting, just downloaded the latest "HP CIFS Server 3 Technology Preview" on my workstation from http://www.software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=CIFSTP3.

The HP CIFS Server 3 - T.30.PV.02 is based on the popular open source software Samba version 3.0.5.

The issue has gone away....I have mapped my id to multiple unix ids - no issues...

Now to decide if I want to put a PV in production....

Rgds...Geoff


Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Xavier Gutierrez_2
Frequent Advisor

Re: Is it possible to map multiple users to multiple unix ids?

Hi, Geoff.

We faced this problem some time ago and decided to go for the group approach.

The thing is that you can create a unix group for each of your samba shares and make the users belong to required group/s.

Then you only need to grant access to the share based on the unix group and not the UID (user)


Cheers,

Javi.
Geoff Wild
Honored Contributor

Re: Is it possible to map multiple users to multiple unix ids?

Xavier - that only works if my NT Users also have an Unix id....

Thanks anyways...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Darren Prior
Honored Contributor

Re: Is it possible to map multiple users to multiple unix ids?

Hi Geoff,

The smb.conf man page contains a couple of useful comments under the "username map" section. One is that the Windows usernames should be white space separated, ie not comma separated.

The other is that you can use a * to wildcard, but this is more useful if you are mapping all remaining users to a single id.

regards,

Darren.
Calm down. It's only ones and zeros...
Geoff Wild
Honored Contributor

Re: Is it possible to map multiple users to multiple unix ids?

Darren - tried the spaces - still no go...

So far, only solution I have is CIFS based on Samba 3.05...

I tried latest 2.2 from HP - 2.2.12 based HP CIFS Server A.01.11.03 - still doesn't work...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.