Tiny Change to allow spaces in valid users list

John Trostel jtrostel at connex.com
Mon Mar 5 15:42:52 GMT 2001

On 05-Mar-2001 Gerald Carter wrote:
> On Mon, 05 Mar 2001 09:03:34 John Trostel wrote:
>> > The current way is just so nice, why changing it?
>> > Simply allow username be presented between quotes if 
>> > you need a space in the username.
>> > 
>> > valid users = tim jack "tic tac toe" me you "a name 
>> > with a \" (quote) in"
>> > 
>> > Space as separator is really clear and intuitive do 
>> > not chnge it please.
>> > 
>> I agree that a space _is_ intuitive! The parseing would 
>> just be a bit more complex with the quoted scheme. In 
>> your example above, wouldn't you have to be looking for 
>> quotes, escaped quotes, and all the normal seperators
>> also?
> John,  
> Just a couple of requirements and observations
>   o any change in parsing user_in_list() type functions
>     (valid/invalud users, force user, etc...) must not 
>     break any existing smb.conf's without a very good
>     reason :-)

Yes... I completely agree.  My tiny fix got us over a problem here. Maybe it
can be fixed a bit better and still handle the situation I need handled.

>   o it would probably help the discussion if you provided
>     the circumstances under which this lack of support
>     for spaces in user names in 'valid users' became
>     a problem (e.g. using winbindd, etc...)

We are semi-automatically adding users into the passwd, smbpasswd, and valid
users lists based on input from a number of sources, depending on the scenario.
We are supporting server-based login, PDC login, NDS, etc.  We are moving
towards an LDAP solution... but...


Users may come in with spaces already in their user names from their
previously selected usernames in NT-land or otherwise and we don't want and
can't really automatically reassign their usernames to some other more
samba-valid user name (using a user list) because of possible name collision.

Is there any problem in working to make user_in_list into the 'more robust'
version that will handle all the current delimiters and _also_ take quoted
names with spaces in the middle of them?  This would take care of the problem I
noted earlier where, if you get rid of the space as a delimiter, you need to be
very careful NOT to put extra spaces in the user list.  (I can see that as
causing problems all the time!)

John M. Trostel
Linux OS Engineer
jtrostel at connex.com

More information about the samba-technical mailing list