From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3)
Description of problem:
Samba requires machine names to be suffixed with a $
useradd has suddenly decided to stop accepting names with a $
This neccesitates the use of vipw or other item to do the adding,
which is a pain because samba has a machine script option, you could
just add a machine to a domain automatically.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. /usr/sbin/useradd test$
2. /user/sbin/useradd tes$t
Actual Results: first one says the username is invalid, second works
but strips everything after the $ so you get tes
Expected Results: a user named test$ and a user named tes$t
most of the howto-s expect you to add the "$" via vipw because "$" is
illegal on many other useradd's as well. There are very good reasons
to limit the legal characters in a username to what is specified by
posix. however, it would be nice to take advantage of 3.x's add
machine script option, so I'm thinking the best way to address this
issue is to allow a "--samba" option to useradd, which is put in the
Samba's solution, to jam machine names into the passwd, is a
ascii-centric hack because it won't work for all cases (i.e. Windows
allows machine/user names way longer than the Linux internal 16 char
username/groupname limit and allows non-ascii unicode). A mapping
table is a better solution. Until that comes around though, we should
allow the "$" for legacy compatibility. Samba needs its i18n to get fixed.
Also, the reason "/usr/sbin/useradd tes$t" failed is because bash
pre-interpreted "$t" as a variable. need to surround it in quotes.
(this is also why posix recommends that user/group names not start
with a "-"... to avoid being interpreted as a command line option).
*** Bug 140582 has been marked as a duplicate of this bug. ***