From owner-freebsd-questions@FreeBSD.ORG Tue Dec 21 17:05:47 2004 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 3AA1516A4CE for ; Tue, 21 Dec 2004 17:05:47 +0000 (GMT) Received: from serv03.inetworx.ch (serv03.inetworx.ch [193.17.199.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF00D43D45 for ; Tue, 21 Dec 2004 17:05:46 +0000 (GMT) (envelope-from dev@eth0.ch) Received: from localhost (localhost.localdomain [127.0.0.1]) by serv03.inetworx.ch (Postfix) with ESMTP id ECE86252D6E for ; Tue, 21 Dec 2004 18:05:45 +0100 (CET) Received: from serv03.inetworx.ch ([127.0.0.1]) by localhost (serv03.inetworx.ch [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 18056-02-2 for ; Tue, 21 Dec 2004 18:05:45 +0100 (CET) Received: from www.inetworx.ch (serv04.inetworx.ch [193.17.199.24]) by serv03.inetworx.ch (Postfix) with ESMTP id AE976252D63 for ; Tue, 21 Dec 2004 18:05:45 +0100 (CET) Received: from 217.162.71.141 (SquirrelMail authenticated user dev.eth0); by www.inetworx.ch with HTTP; Tue, 21 Dec 2004 18:05:45 +0100 (CET) Message-ID: <1706.217.162.71.141.1103648745.squirrel@217.162.71.141> Date: Tue, 21 Dec 2004 18:05:45 +0100 (CET) From: "David E. Meier" To: freebsd-questions@freebsd.org User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: by amavisd-new at inetworx.ch Subject: Problem with chroot, uid's and quota 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: Tue, 21 Dec 2004 17:05:47 -0000 I have installed openssh-portable with the chroot option enabled. Users can login and execute the commands I supplied in their chroot'ed home directory. I included an /etc/fstab file for the quota enabled devices and hard linked the quota.user file to the base direcotry of the chroot. In addidtion I copied the entries for the root and chroot'ed user as well as the relevant groups to /etc/passwd and /etc/group in the chroot directory. So far so good. If I login as the chrooted user and type the command quota by itself I get the correct values returned: $ quota Disk quotas for user (no account) (uid 1003): Filesystem usage quota limit grace files quota limit grace / 8 512000 563200 4 0 0 However, when executing the quota command with the user name appended I get: $ quota myuser quota: myuser: unknown user Similar with ls: $ ls -al total 96 drwxr-xr-x 8 0 wheel 512 Dec 21 17:41 . drwxr-xr-x 8 0 wheel 512 Dec 21 17:41 .. dr-x--x--x 2 0 wheel 512 Dec 21 16:53 bin drwxr-xr-x 2 0 wheel 512 Dec 21 17:42 dev dr-xr-xr-x 2 0 wheel 512 Dec 21 16:54 etc drwxr-xr-x 4 1003 mygroup 512 Dec 21 16:47 home dr-x--x--x 2 0 wheel 512 Dec 21 16:47 lib dr-x--x--x 2 0 wheel 512 Dec 21 16:47 libexec -rw-r----- 3 0 operator 2097120 Dec 21 17:44 quota.user Somehow the gid's can get mapped to names but the uid's can't. Can anyone point out what I need to adjust or is required to get uid's working with names as well? Dave