Bug 138782 - $ cannot be in username, making samba machine names impossible
$ cannot be in username, making samba machine names impossible
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: shadow-utils (Show other bugs)
3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Eido Inoue
David Lawrence
:
: 140582 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-11-10 23:53 EST by liz
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version: 4.0.3-41
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-11-16 18:34:54 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description liz 2004-11-10 23:53:40 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3)
Gecko/20040913 Firefox/0.10.1

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):


How reproducible:
Always

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
Comment 1 Eido Inoue 2004-11-11 16:02:15 EST
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
script.

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).
Comment 2 Eido Inoue 2004-11-24 00:16:49 EST
*** Bug 140582 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.