Tiny Change to allow spaces in valid users list

Simo Sorce simo.sorce at polimi.it
Mon Mar 5 14:37:09 GMT 2001


On Mon, 5 Mar 2001, David Collier-Brown wrote:

> On Fri, 02 Mar 2001 13:11:57 John Trostel wrote:
> > > With a tiny change, samba 2.2 can be made to accept
> > > user names with spaces in them in the
> > > valid users =
> [...]
> > > Since smbpasswd already accepts spaces,
> > > is there any compelling reason NOT to allow spaces in user
> > > names here?
>
> Gerald Carter wrote:
> > Suppose a system has an existing share defined as so
> >
> >         [foo]
> >                 path = /tmp
> >                 valid users = tom jerry
> >
> > By inserting your change, will it break this and interpret
> > the account in the valid users line as 'tom jerry'?
>
> 	Arguably it will, due to the use of tabs as the
> 	seperators.
>
> 	I like the idea, but not the implementation.
>
> 	1) I'd suggest slashes, and require they be the first
> 	and last characters of the string, like
> 		valid users = /tom/jerry/tim smith/
> 	2) during a cut-over period fom 2.2.0 to 2.3.0, strings
> 	   without slashes should be interpreted as before, and
> 	   a warning message issued at log level 0
> 	3) after the cut-over period, the slashes should be
> 	   required, and the erronious line rejected.
>
> 	This makes the option unambiguous, "except for a short
> 	and bounded period" (the latter quote is from a safety-
> 	critical-systems course I took some years back (;-))
>
> 	There is already code to parse slash-lists, so using it
> 	would be a smallish change too.
>
> --dave
>

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.

Simo.

-- 
Simo Sorce - Linux Systems Consultant
E-mail: simo.sorce at polimi.it
Tel: +39 0348 7149179 - Fax: +39 02 700442399
-----------------------------------------------------------------
Be happy, use Linux!





More information about the samba-technical mailing list