Safe netbios characters

Tim Potter tpot at samba.org
Thu Jan 17 13:10:55 GMT 2002


On Thu, Jan 17, 2002 at 02:07:54PM -0600, Jason Holland wrote:

> hello,
>   i appologize if this post is inappropriate, but i was unable to get an 
> answer on samba users list.  i'm trying to change the source to samba to 
> allow a ! in the usernames.  would this code modification be the only one 
> needed to accomplish this???  if not, where else would i look??
> 
> *** reply.c     Thu Jan 17 13:49:00 2002
> --- reply-1.c   Thu Jan 17 13:55:11 2002
> ***************
> *** 857,863 ****
>     }
>   
>     /* don't allow strange characters in usernames or domains */
> -   alpha_strcpy(user, user, ". _-$", sizeof(user));
> +   alpha_strcpy(user, user, "!. _-$", sizeof(user));
>     alpha_strcpy(domain, domain, ". _-", sizeof(domain));
>     if (strstr(user, "..") || strstr(domain,"..")) {
>           return ERROR_BOTH(NT_STATUS_LOGON_FAILURE,ERRSRV,ERRbadpw);
> 
> anyone able to help out?  please cc me as i'm not subscribed to the list, 
> or cc the samba users list.  thank for your help in this matter.

I'm not sure whether this patch is complete.  According to the User Manager 
the following characters can't be present in a username: "/\[]:;|=,+*?<> 

Not sure about domain names though.  Also the space character is specifically
allowed in both domain and usernames!


Tim.




More information about the samba-technical mailing list