From e-masson@kisoft-services.com  Fri Apr  5 04:16:04 2002
Return-Path: <e-masson@kisoft-services.com>
Received: from musique.teaser.net (musique.teaser.net [213.91.2.11])
	by hub.freebsd.org (Postfix) with ESMTP id ACE2737B419
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  5 Apr 2002 04:16:03 -0800 (PST)
Received: from notbsdems.nantes.kisoft-services.com (nantes.kisoft-services.com [193.56.60.243])
	by musique.teaser.net (Postfix) with ESMTP id 3334B72556
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  5 Apr 2002 14:16:02 +0200 (CEST)
Received: by notbsdems.nantes.kisoft-services.com (Postfix, from userid 1001)
	id B7566E6C15; Fri,  5 Apr 2002 14:15:26 +0200 (CEST)
Message-Id: <20020405121526.B7566E6C15@notbsdems.nantes.kisoft-services.com>
Date: Fri,  5 Apr 2002 14:15:26 +0200 (CEST)
From: Eric Masson <e-masson@kisoft-services.com>
Reply-To: Eric Masson <e-masson@kisoft-services.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Add support for $ character in usernames
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         36785
>Category:       bin
>Synopsis:       Add support for $ character in usernames
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 05 04:20:01 PST 2002
>Closed-Date:    Fri Dec 20 09:40:21 PST 2002
>Last-Modified:  Fri Dec 20 09:40:21 PST 2002
>Originator:     Eric Masson
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
Kisoft Services
>Environment:
System: FreeBSD notbsdems.nantes.kisoft-services.com 4.5-STABLE FreeBSD 4.5-STABLE #1: Wed Feb 20 17:31:13 CET 2002 root@notbsdems.nantes.kisoft-services.com:/usr/obj/usr/src/sys/TP390 i386


>Description:

	Running Samba as a PDC for Windows XP workstations on FreeBSD implies the
	ability to create user accounts ending by the character '$' in batch mode.
	pw useradd doesn't allow that.

>How-To-Repeat:

	pw useradd stationxp$ -g wheel -c Machine -d /dev/null -s /nonexistent
	pw: invalid character `$' in field

>Fix:

*** pw_user.c.original  Thu Mar 21 17:54:15 2002
--- pw_user.c   Fri Apr  5 13:35:13 2002
***************
*** 1195,1201 ****
  pw_checkname(u_char *name, int gecos)
  {
        int             l = 0;
!       char const     *notch = gecos ? ":!@" : " ,\t:+&#%$^()!@~*?<>=|\\/\"";
  
        while (name[l]) {
                if (strchr(notch, name[l]) != NULL || name[l] < ' ' || name[l] == 127 ||
--- 1195,1201 ----
  pw_checkname(u_char *name, int gecos)
  {
        int             l = 0;
!       char const     *notch = gecos ? ":!@" : " ,\t:+&#%^()!@~*?<>=|\\/\"";
  
        while (name[l]) {
                if (strchr(notch, name[l]) != NULL || name[l] < ' ' || name[l] == 127 ||

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: maxim 
State-Changed-When: Fri Dec 20 09:38:47 PST 2002 
State-Changed-Why:  
Duplicate of bin/22860 and bin/28773. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=36785 
>Unformatted:
