Tiny Change to allow spaces in valid users list

Gerald Carter gcarter at valinux.com
Mon Mar 5 14:21:56 GMT 2001

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 =
> line of a smb.conf file.
> If I change the LIST_SEP in the user_in_list function of
> sources/lib/username.c
> from its default value " \t,;:\n\r" (as #defined in local.h) 
> to merely "\t,;:\n\r", samba happily (it seems so far) accepts 
> users with spaces.  Since smbpasswd already accepts spaces, 
> is there any compelling reason NOT to allow spaces in user 
> names here?
> P.S.  I'm testing the change out here locally in the meantime.

This seems like an qacceptable change to me.  How do you have 
people who use ' ' as a field delimiter instead of ','?  
Usernames must be in quotes I guess.  

Suppose a system has an existing share defined as so

		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'?

Cheers, jerry
   /\  Gerald (Jerry) Carter                     Professional Services
 \/    http://www.valinux.com/  VA Linux Systems   gcarter at valinux.com
       http://www.samba.org/       SAMBA Team          jerry at samba.org
       http://www.plainjoe.org/                     jerry at plainjoe.org

       "...a hundred billion castaways looking for a home."
                                - Sting "Message in a Bottle" ( 1979 )

More information about the samba-technical mailing list