From owner-freebsd-current Thu Jan 23 18:38:42 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 052D937B401 for ; Thu, 23 Jan 2003 18:38:41 -0800 (PST) Received: from stork.mail.pas.earthlink.net (stork.mail.pas.earthlink.net [207.217.120.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F09843EB2 for ; Thu, 23 Jan 2003 18:38:40 -0800 (PST) (envelope-from tlambert2@mindspring.com) Received: from pool0463.cvx22-bradley.dialup.earthlink.net ([209.179.199.208] helo=mindspring.com) by stork.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 18btji-0005gn-00; Thu, 23 Jan 2003 18:38:31 -0800 Message-ID: <3E30A6D3.85A818C4@mindspring.com> Date: Thu, 23 Jan 2003 18:37:07 -0800 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Max Khon Cc: Craig Rodrigues , freebsd-current@freebsd.org Subject: Re: pw References: <20030124022538.C36624@iclub.nsu.ru> <20030123205418.GA41199@attbi.com> <20030124030942.A37794@iclub.nsu.ru> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4691f26713c5a4ca8f598774a658d69aea7ce0e8f8d31aa3f350badd9bab72f9c350badd9bab72f9c Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Max Khon wrote: > most messages were related to adduser.pl. adduser.pl has gone > and adduser.sh now uses pw directly > > as for login class and group names -- there is nothing wrong with '$' > in them but if anyone would be uncomfortable with it why not commit > the patch that someone (Terry?) suggested that filters out '$' from > login class and group names? For the same reason that "adduser" was part of the discussion. The main reason behind my patch was to minimize the amount of weird-ass characters someone writing a script to call the "pw" program would have to deal with escaping, quoting, or otherwise beating into submission so that they would not be interpreted by the sh, perl, PHP, Python, Eiffel, or whatever interpreter that was doing the calling. The problem is that, by default, when a user is created, a group with the same name is created. Therefore the patch I proposed is not quite correct, in that it disallows it in both group names and login classes, rather than just login classes. The end result is that the standard tools would need to create both. This is a problem in the "adduser" case, and other cases, because "$" is a significant character to the scripts, and therefore a lot of care would have to be done in order to quote the use of it in both user names and passwords. In truth, the group name should not be alowed to default, and it should instead be set to something like "samba" or "sambashare", instead of equalling the password file entry. Given the mapping between UNIX and SMB permissions, in fact, each share should use its own group, too (probably with the stick bit set for proper inheritance). In any case, the other major point in that thread is that the "$" should be implied by the Samba source code, and one of the people monitoring the thread, involved in the Samba project, was going to take that suggestion to the Samba people for them to act on it; and that was where the thread left off. So the question is: what has Samba done about implying the "$", and stripping it off then end of the user name before trying to compare the username and password in the host user database? -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message