From owner-freebsd-questions@FreeBSD.ORG Fri Apr 15 06:31:21 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9B48C16A4CE for ; Fri, 15 Apr 2005 06:31:21 +0000 (GMT) Received: from rosebud.otenet.gr (rosebud.otenet.gr [195.170.0.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 99FB943D46 for ; Fri, 15 Apr 2005 06:31:20 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-a052.otenet.gr [212.205.215.52]) j3F6UHHs011910; Fri, 15 Apr 2005 09:30:18 +0300 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.3/8.13.3) with ESMTP id j3F6VDKl001478; Fri, 15 Apr 2005 09:31:13 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.13.3/8.13.3/Submit) id j3F6VD96001477; Fri, 15 Apr 2005 09:31:13 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Fri, 15 Apr 2005 09:31:13 +0300 From: Giorgos Keramidas To: Timothy Smith Message-ID: <20050415063112.GB1061@gothmog.gr> References: <425F0BE3.7000508@open-networks.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <425F0BE3.7000508@open-networks.net> cc: freebsd-questions@freebsd.org Subject: Re: grappling with users X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2005 06:31:21 -0000 On 2005-04-15 10:33, Timothy Smith wrote: > whats the correct method of creating a deamon user account, which you > can use to start a deamon process but can't be logged into. so far i > have not seen a single good explaination or example of this below is > my svn user, who has /sbin/nologin, but can't be used because it runs > the no login shell. whats the correct way to do this? > > %su svn -c "svnadmin create /usr/local/svn/PubWare" > This account is currently not available. I don't know if this is the Correct(TM) way, but you can use the -m option of su(1), and change your id from superuser to the user locked out with /sbin/nologin: : gothmog:/root# grep ^nobody /etc/passwd : nobody:*:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin : gothmog:/root# su -m nobody : root@gothmog[9:29am]/root> id : uid=65534(nobody) gid=65534(nobody) groups=65534(nobody)