smbd does not support space in user or group name

Esh, Andrew AEsh at tricord.com
Tue Feb 12 14:44:05 GMT 2002


Here's what I use with winbind:

	valid users = "@%D+Domain Users"

or if you don't want to use macros, this would work with domain name
"DOMAIN":

	valid users = "@DOMAIN+Domain Users"

Perhaps I am misunderstanding the problem, but I don't see why any change is
needed.

-----Original Message-----
From: Gerald Carter [mailto:jerry at samba.org]
Sent: Tuesday, February 12, 2002 4:18 PM
To: Lin Li
Cc: samba-technical at lists.samba.org
Subject: Re: smbd does not support space in user or group name


On Tue, 12 Feb 2002, Lin Li wrote:

> Lin Li wrote:
> 
> > The winbind enables the use of domain users and groups. The domain user
> > or group name may contain space such as "Domain Users". But the smbd
> > does not support this. So I can not access those shares which have their
> > permission granted to users and groups like "Domain Users". Is it
> > possible to remove the space in "LIST_SEP" in the include/local.h or not
> > to use "LIST_SEP" when getting user and group from user list and group
> > list?

Hmmm... I though you could simply do something like

	valid users = " @"Domain Users" "




jerry


> >
> > Thanks,
> > Lin
> 
> I made following change to solve this problem. (use 2.2.3a)
> -------------------------------------------------------
> --- smbd/password.c     Tue Feb 12 15:21:49 2002
> +++ smbd/password.c.old Tue Feb 12 12:16:54 2002
> @@ -358,7 +358,7 @@
>                 if (strlen(suser) + strlen(session_users) + 2 >=
> sizeof(pstring))
>                         DEBUG(1,("Too many session users??\n"));
>                 else {
> -                       pstrcat(session_users,"\t");
> +                       pstrcat(session_users," ");
>                         pstrcat(session_users,suser);
>                 }
>         }
> @@ -786,8 +786,8 @@
>                         if (!user_list)
>                                 return(False);
> 
> -                       for (auser=strtok(user_list,"\t,;:\n\r"); !ok &&
> auser;
> -
> auser = strtok(NULL,"\t,;:\n\r")) {
> +                       for (auser=strtok(user_list,LIST_SEP); !ok &&
> auser;
> +
> auser = strtok(NULL,LIST_SEP)) {
>                                 fstring user2;
>                                 fstrcpy(user2,auser);
>                                 if (!user_ok(user2,snum))
> 
> --- lib/username.c      Tue Feb 12 15:23:02 2002
> +++ lib/username.c.old  Sat Feb  2 19:46:42 2002
> @@ -449,7 +449,7 @@
> 
>         DEBUG(10,("user_in_list: checking user %s in list %s\n", user,
> list));
> 
> -       while (next_token(&p,tok,"\t,;:\n\r", sizeof(tok))) {
> +       while (next_token(&p,tok,LIST_SEP, sizeof(tok))) {
> 
>                 DEBUG(10,("user_in_list: checking user |%s| in group
> |%s|\n", user, tok));
> -------------------------------------------------------
> Will this cause any problem?
> 
> Thanks,
> Lin
> 
> 
> 
> 

-- 
 ---------------------------------------------------------------------
 Hewlett-Packard                                     http://www.hp.com
 SAMBA Team                                       http://www.samba.org
 --                                            http://www.plainjoe.org
 "Sam's Teach Yourself Samba in 24 Hours" 2ed.      ISBN 0-672-32269-2
 --"I never saved anything for the swim back." Ethan Hawk in Gattaca--

-------------- next part --------------
HTML attachment scrubbed and removed


More information about the samba-technical mailing list