xref: /dflybsd-src/lib/libpam/modules/pam_chroot/pam_chroot.8 (revision c98db40744766ab0803912f29557df02814bcd9d)
1242be47eSzrj.\" Copyright (c) 2003 Networks Associates Technology, Inc.
2242be47eSzrj.\" All rights reserved.
3242be47eSzrj.\"
4242be47eSzrj.\" Portions of this software were developed for the FreeBSD Project by
5242be47eSzrj.\" ThinkSec AS and NAI Labs, the Security Research Division of Network
6242be47eSzrj.\" Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035
7242be47eSzrj.\" ("CBOSS"), as part of the DARPA CHATS research program.
8242be47eSzrj.\"
9242be47eSzrj.\" Redistribution and use in source and binary forms, with or without
10242be47eSzrj.\" modification, are permitted provided that the following conditions
11242be47eSzrj.\" are met:
12242be47eSzrj.\" 1. Redistributions of source code must retain the above copyright
13242be47eSzrj.\"    notice, this list of conditions and the following disclaimer.
14242be47eSzrj.\" 2. Redistributions in binary form must reproduce the above copyright
15242be47eSzrj.\"    notice, this list of conditions and the following disclaimer in the
16242be47eSzrj.\"    documentation and/or other materials provided with the distribution.
17242be47eSzrj.\" 3. The name of the author may not be used to endorse or promote
18242be47eSzrj.\"    products derived from this software without specific prior written
19242be47eSzrj.\"    permission.
20242be47eSzrj.\"
21242be47eSzrj.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
22242be47eSzrj.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23242be47eSzrj.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24242be47eSzrj.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
25242be47eSzrj.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26242be47eSzrj.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27242be47eSzrj.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28242be47eSzrj.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29242be47eSzrj.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30242be47eSzrj.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31242be47eSzrj.\" SUCH DAMAGE.
32242be47eSzrj.\"
33*c98db407SSascha Wildner.\" $FreeBSD: head/lib/libpam/modules/pam_chroot/pam_chroot.8 131504 2004-07-02 23:52:20Z ru $
34242be47eSzrj.\"
35242be47eSzrj.Dd February 10, 2003
36242be47eSzrj.Dt PAM_CHROOT 8
37242be47eSzrj.Os
38242be47eSzrj.Sh NAME
39242be47eSzrj.Nm pam_chroot
40242be47eSzrj.Nd Chroot PAM module
41242be47eSzrj.Sh SYNOPSIS
42242be47eSzrj.Op Ar service-name
43242be47eSzrj.Ar module-type
44242be47eSzrj.Ar control-flag
45242be47eSzrj.Pa pam_chroot
46242be47eSzrj.Op Ar arguments
47242be47eSzrj.Sh DESCRIPTION
48242be47eSzrjThe chroot service module for PAM chroots users into either a
49242be47eSzrjpredetermined directory or one derived from their home directory.
50242be47eSzrjIf a user's home directory as specified in the
51242be47eSzrj.Vt passwd
52242be47eSzrjstructure returned by
53242be47eSzrj.Xr getpwnam 3
54242be47eSzrjcontains the string
55242be47eSzrj.Dq Li /./ ,
56242be47eSzrjthe portion of the directory name to the left of that string is used
57242be47eSzrjas the chroot directory, and the portion to the right will be the
58242be47eSzrjcurrent working directory inside the chroot tree.
59242be47eSzrjOtherwise, the directories specified by the
60242be47eSzrj.Cm dir
61242be47eSzrjand
62242be47eSzrj.Cm cwd
63242be47eSzrjoptions (see below) are used.
64242be47eSzrj.Bl -tag -width ".Cm also_root"
65242be47eSzrj.It Cm also_root
66242be47eSzrjDo not hold user ID 0 exempt from the chroot requirement.
67242be47eSzrj.It Cm always
68242be47eSzrjReport a failure if a chroot directory could not be derived from the
69242be47eSzrjuser's home directory, and the
70242be47eSzrj.Cm dir
71242be47eSzrjoption was not specified.
72242be47eSzrj.It Cm cwd Ns = Ns Ar directory
73242be47eSzrjSpecify the directory to
74242be47eSzrj.Xr chdir 2
75242be47eSzrjinto after a successful
76242be47eSzrj.Xr chroot 2
77242be47eSzrjcall.
78242be47eSzrj.It Cm dir Ns = Ns Ar directory
79242be47eSzrjSpecify the chroot directory to use if one could not be derived from
80242be47eSzrjthe user's home directory.
81242be47eSzrj.El
82242be47eSzrj.Sh SEE ALSO
83dfc0c85aSSascha Wildner.Xr pam 3 ,
84dfc0c85aSSascha Wildner.Xr pam.conf 5
85242be47eSzrj.Sh AUTHORS
86242be47eSzrjThe
87242be47eSzrj.Nm
88242be47eSzrjmodule and this manual page were developed for the
89242be47eSzrj.Fx
90242be47eSzrjProject by
91242be47eSzrjThinkSec AS and NAI Labs, the Security Research Division of Network
92242be47eSzrjAssociates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035
93242be47eSzrj.Pq Dq CBOSS ,
94242be47eSzrjas part of the DARPA CHATS research program.
95