Problem with chroot, uid's and quota
David E. Meier
dev at eth0.ch
Tue Dec 21 09:05:47 PST 2004
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
More information about the freebsd-questions
mailing list