Future feature question: mapping user name automagically
davecb at Canada.Sun.COM
Wed Jan 13 15:09:43 GMT 1999
Another subscriber to this list had the unenviable task of adapting to
some thousands of users, all with disparate unix and NT id's. For
reasons, he didn't want to create a username map manually, and was
for a programmatic way of doing the equivalent.
What he hoped to do was shift the task to the users, by telling them
connect to //<server>/<share> where <share> was the name of the unix
Alas, there was no obvious way to do this.
I'm speculating that one might create an "auto" username map to
In map_username, one might see of the value of lp_username_map() was
a distinguished string, say AUTO, and if so return the share name.
Does this sound sane? I can see where one would do the changes to
but as it's used many places, I'm not sure what the side-effects of
change might be.
I also don't know the then current value of <share> is in each case:
might not be possible in all cases where map_username is called.
A variant on this might be "username map = AUTO <pathname>", which
attempts to look up the name in the map first, then tries to map it to
username share. If the auto mapping succeeds, it appends this new
to <pathname> for other calls to use.
[1. from cscope:
Functions calling this function: map_username
File Function Line
1 srv_lsa.c api_lsa_lookup_names 485 map_username(user_name);
2 srv_netlog.c api_net_sam_logon 666 map_username(nt_username);
3 ipc.c api_SetUserPassword 1689 (void )map_username(user);
4 ipc.c api_SamOEMChangePassword 1773 (void )map_username(user);
5 reply.c reply_tcon 228 (void )map_username(user);
6 reply.c reply_tcon_and_X 308 (void )map_username(user);
7 reply.c reply_sesssetup_and_X 726 (void )map_username(user);
8 service.c find_service 102 if (map_username(service))
9 proto.h CatchSignal 219 BOOL map_username(char
David Collier-Brown, | Always do right. This will gratify some people
185 Ellerslie Ave., | and astonish the rest. -- Mark Twain
Willowdale, Ontario | http://java.science.yorku.ca/~davecb
Work: (905) 477-0437 Home: (416) 223-8968 Email: davecb at canada.sun.com
More information about the samba-technical