From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Description of problem:
Samba uses a command like this to add machine accounts:
add machine script = /usr/sbin/useradd -d /dev/null -g machines -c 'Machine Account' -s /bin/false -M %u
This creates an account with a '$' (dollar sign) at the end of it. useradd doesn't allow a username with this symbol (the error "useradd: invalid user name 'test$'").
To create machine accounts, I have to add the user without the '$' and then modify /etc/passwd.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. /usr/sbin/useradd -d /dev/null -g machines -c 'Machine Account' -s /bin/false -M test$
Actual Results: useradd: invalid user name 'test$'
Expected Results: Account should have been created.
I believe some versions of adduser had a switch to allow non-standard characters like '$'.
Created attachment 111880 [details]
This patch simply adds "$" as an allowed character in a username, as long as it
isn't the first character.
Created attachment 111881 [details]
And the same patch with the comment actually matching the code.
Test packages uploaded to:
These packages work for me and solve this problem with Samba. Any word on
if/when this will be officially released as an update for RHEL4?
RHEL4 Beta channel has shadow-utils with $ patch inside according to the
changelog. I did not tested it yet as it requires newer audit-libs. You may try
to subscribe to RHEL4 Beta channel through RHN and then do "up2date -u
shadow-utils" (and then unsubscribe from Beta channel).
I'm using package from comment #6 with no problem.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.
*** Bug 169868 has been marked as a duplicate of this bug. ***