xref: /netbsd-src/lib/libpam/modules/pam_chroot/pam_chroot.8 (revision e7d22a2e645325144a9d854bb08f879ae427542a)
1*e7d22a2eSchristos.\" $NetBSD: pam_chroot.8,v 1.2 2004/12/12 08:18:43 christos Exp $
26f11bdf1Schristos.\" Copyright (c) 2003 Networks Associates Technology, Inc.
36f11bdf1Schristos.\" All rights reserved.
46f11bdf1Schristos.\"
56f11bdf1Schristos.\" Portions of this software were developed for the FreeBSD Project by
66f11bdf1Schristos.\" ThinkSec AS and NAI Labs, the Security Research Division of Network
76f11bdf1Schristos.\" Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035
86f11bdf1Schristos.\" ("CBOSS"), as part of the DARPA CHATS research program.
96f11bdf1Schristos.\"
106f11bdf1Schristos.\" Redistribution and use in source and binary forms, with or without
116f11bdf1Schristos.\" modification, are permitted provided that the following conditions
126f11bdf1Schristos.\" are met:
136f11bdf1Schristos.\" 1. Redistributions of source code must retain the above copyright
146f11bdf1Schristos.\"    notice, this list of conditions and the following disclaimer.
156f11bdf1Schristos.\" 2. Redistributions in binary form must reproduce the above copyright
166f11bdf1Schristos.\"    notice, this list of conditions and the following disclaimer in the
176f11bdf1Schristos.\"    documentation and/or other materials provided with the distribution.
186f11bdf1Schristos.\" 3. The name of the author may not be used to endorse or promote
196f11bdf1Schristos.\"    products derived from this software without specific prior written
206f11bdf1Schristos.\"    permission.
216f11bdf1Schristos.\"
226f11bdf1Schristos.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
236f11bdf1Schristos.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
246f11bdf1Schristos.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
256f11bdf1Schristos.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
266f11bdf1Schristos.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
276f11bdf1Schristos.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
286f11bdf1Schristos.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
296f11bdf1Schristos.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
306f11bdf1Schristos.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
316f11bdf1Schristos.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
326f11bdf1Schristos.\" SUCH DAMAGE.
336f11bdf1Schristos.\"
346f11bdf1Schristos.\" $FreeBSD: src/lib/libpam/modules/pam_chroot/pam_chroot.8,v 1.4 2004/07/02 23:52:16 ru Exp $
356f11bdf1Schristos.\"
366f11bdf1Schristos.Dd February 10, 2003
376f11bdf1Schristos.Dt PAM_CHROOT 8
386f11bdf1Schristos.Os
396f11bdf1Schristos.Sh NAME
406f11bdf1Schristos.Nm pam_chroot
416f11bdf1Schristos.Nd Chroot PAM module
426f11bdf1Schristos.Sh SYNOPSIS
436f11bdf1Schristos.Op Ar service-name
446f11bdf1Schristos.Ar module-type
456f11bdf1Schristos.Ar control-flag
466f11bdf1Schristos.Pa pam_chroot
476f11bdf1Schristos.Op Ar arguments
486f11bdf1Schristos.Sh DESCRIPTION
496f11bdf1SchristosThe chroot service module for PAM chroots users into either a
506f11bdf1Schristospredetermined directory or one derived from their home directory.
516f11bdf1SchristosIf a user's home directory as specified in the
526f11bdf1Schristos.Vt passwd
536f11bdf1Schristosstructure returned by
546f11bdf1Schristos.Xr getpwnam 3
556f11bdf1Schristoscontains the string
566f11bdf1Schristos.Dq Li /./ ,
576f11bdf1Schristosthe portion of the directory name to the left of that string is used
586f11bdf1Schristosas the chroot directory, and the portion to the right will be the
596f11bdf1Schristoscurrent working directory inside the chroot tree.
606f11bdf1SchristosOtherwise, the directories specified by the
616f11bdf1Schristos.Cm dir
626f11bdf1Schristosand
636f11bdf1Schristos.Cm cwd
646f11bdf1Schristosoptions (see below) are used.
656f11bdf1Schristos.Bl -tag -width ".Cm also_root"
666f11bdf1Schristos.It Cm also_root
676f11bdf1SchristosDo not hold user ID 0 exempt from the chroot requirement.
686f11bdf1Schristos.It Cm always
696f11bdf1SchristosReport a failure if a chroot directory could not be derived from the
706f11bdf1Schristosuser's home directory, and the
716f11bdf1Schristos.Cm dir
726f11bdf1Schristosoption was not specified.
736f11bdf1Schristos.It Cm cwd Ns = Ns Ar directory
746f11bdf1SchristosSpecify the directory to
756f11bdf1Schristos.Xr chdir 2
766f11bdf1Schristosinto after a successful
776f11bdf1Schristos.Xr chroot 2
786f11bdf1Schristoscall.
796f11bdf1Schristos.It Cm dir Ns = Ns Ar directory
806f11bdf1SchristosSpecify the chroot directory to use if one could not be derived from
816f11bdf1Schristosthe user's home directory.
826f11bdf1Schristos.El
836f11bdf1Schristos.Sh SEE ALSO
846f11bdf1Schristos.Xr pam.conf 5 ,
856f11bdf1Schristos.Xr pam 8
866f11bdf1Schristos.Sh AUTHORS
876f11bdf1SchristosThe
886f11bdf1Schristos.Nm
896f11bdf1Schristosmodule and this manual page were developed for the
906f11bdf1Schristos.Fx
916f11bdf1SchristosProject by
926f11bdf1SchristosThinkSec AS and NAI Labs, the Security Research Division of Network
936f11bdf1SchristosAssociates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035
946f11bdf1Schristos.Pq Dq CBOSS ,
956f11bdf1Schristosas part of the DARPA CHATS research program.
96