From owner-freebsd-questions@FreeBSD.ORG Mon Oct 29 08:28:29 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2E140D97 for ; Mon, 29 Oct 2012 08:28:29 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) by mx1.freebsd.org (Postfix) with ESMTP id D265B8FC0A for ; Mon, 29 Oct 2012 08:28:28 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TSki0-0004gY-IG for freebsd-questions@freebsd.org; Mon, 29 Oct 2012 09:28:34 +0100 Received: from 79-139-19-75.prenet.pl ([79.139.19.75]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 29 Oct 2012 09:28:32 +0100 Received: from jb.1234abcd by 79-139-19-75.prenet.pl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 29 Oct 2012 09:28:32 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: jb Subject: /etc/passwd and "&" char Date: Mon, 29 Oct 2012 08:28:06 +0000 (UTC) Lines: 53 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 79.139.19.75 (Mozilla/5.0 (X11; FreeBSD i386; rv:16.0) Gecko/20100101 Firefox/16.0) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 08:28:29 -0000 Hi, Question: What is the purpose of the "&" char in GECOS fields, e.g. user's name field, in /etc/passwd file ? $ grep "&" /etc/passwd root:*:0:0:Charlie &:/root:/bin/csh operator:*:2:5:System &:/:/usr/sbin/nologin svn:*:1002:1002:User &:/home/svn:/usr/sbin/nologin The field containing "&" char represents "-c comment" option in pw(8), which sets up GECOS fields (user's full name, etc). The pw(8) states further: ... The pw utility allows 8-bit characters in the passwd GECOS field ... ... Using 8-bit characters may also affect other programs that transmit the contents of the GECOS field over the Internet, such as fingerd(8), and a small number of TCP/IP clients, such as IRC, where full names specified in the passwd file may be used by default. ... http://en.wikipedia.org/wiki/Ampersand ... Encoding and display ... Programming languages ... The ampersand character is used as a special character in at least some versions of the database software originally created in Denmark under the name Navision (the software has since been acquired by Microsoft). Using this character in either "Text" or "Code" fields could create difficulties for performing certain tasks in Navision, such as filtering records (either by the user or by programming). It is also used as described below to indicate shortcuts in menu items and lab els. ... Text markup In SGML, XML, and HTML, ... This creates what is known as the ampersand problem. ... ... Unix shells ... Web standards ... Google search results for "& character": Special (escape) characters in SGML, HTML and XML documents: & & & ampersand jb