Subject: Re: bin/23922: useradd(8) isn't useful to add machine account for Samba
To: None <taca@back-street.net>
From: Greg A. Woods <woods@weird.com>
List: netbsd-bugs
Date: 12/29/2003 17:57:50
[ On Monday, December 29, 2003 at 13:36:48 (+0900), taca@back-street.net wrote: ]
> Subject: bin/23922: useradd(8) isn't useful to add machine account for Samba
>
> useradd(8) can't add a machine account for Samba. A machine
> account's login name is end with "$" and it is used for adding
> a machine to Windows domain provided by Samba.
That's unfortunate.
> >Fix:
> Make useradd(8) allow '$' as valid login name or add an option
> to relax login name checking.
While a trailing '$' is maybe not the worst thing in the world for a
shell token, and most shells may leave it alone, generally it's not a
very good idea to try to include a '$' in anything that might end up as
a shell token in a script or on the command line (e.g. in a username or
filename).
I think it's very wise of useradd(8) to disallow usernames with '$'
characters in them.
At most it might be OK to add an option to useradd(8) that would allow
the addition of a username with a trailing dollar sign.
Better though would be to fix Samba. A trailing underscore or hyphen or
some similar non-special character would be much safer for computer
accounts.
--
Greg A. Woods
+1 416 218-0098 VE3TCP RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com> Secrets of the Weird <woods@weird.com>