From owner-freebsd-questions Tue Mar 5 18:39:21 2002 Delivered-To: freebsd-questions@freebsd.org Received: from laika.martini.nu (12-224-18-46.client.attbi.com [12.224.18.46]) by hub.freebsd.org (Postfix) with SMTP id 7E40637B7DF for ; Tue, 5 Mar 2002 18:37:04 -0800 (PST) Received: (qmail 23377 invoked by uid 1001); 6 Mar 2002 02:37:03 -0000 Date: Tue, 5 Mar 2002 18:37:02 -0800 To: "Paul C. Boyle" Cc: Andreas Fiedler , freebsd-questions@FreeBSD.ORG Subject: Re: $ character in user names Message-ID: <20020305183702.E19936@martini.nu> References: <3C83F6CC.FECF12B8@computerservice-fiedler.de> <200203050311.WAA30316@alpha.vaxxine.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200203050311.WAA30316@alpha.vaxxine.com>; from "freebsdruns@yahoo.com" on Mon, Mar 04, 2002 at 10:12:14PM X-Sysinfo: FreeBSD 4.5-RELEASE, up 2:04 From: Mahlon X-Delivery-Agent: TMDA/0.44 (Python 2.2; freebsd-4.5-RELEASE-i386) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Mar 04, 2002, Paul C. Boyle wrote: > On March 4, 2002 05:35 pm, you wrote: > > Hi all, > > > > I need to add a user with a name ending in $ for adding machines to a Samba > > smbpass file (domain setup). > > > > Adduser and pw both reject illegal characters like $. Is there a > > possibility to manually override that behaviour? > > > > try puting a \ in front of the $ character Backquoting it won't help, the problem is that pw doesn't allow the '$' character for usernames at all. If this is for a samba PDC, and you want automatic joining of new machines to the domain, manually editing vipw won't help you either, Andrew. The solution is to patch pw to allow $, which fortunately is so trivial I'll just describe it instead of sending a diff. % cd /usr/src/usr.sbin/pw Edit line 1198 of pw_user.c. Remove the only '$' character from the line. % make && make install Should work dandy after that. Mahlon E. Smith jabber id: mahlon@chat.martini.nu http://www.martini.nu/ get pgp key: mahlon-pgp@martini.nu .......................................................................... Only in America... do they have drive up ATM machines with braille lettering. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message