Move /var/svc/log to /var/log/svc
[unleashed/lotheac.git] / share / man / man4 / logindevperm.4
blobdf9a45d3de36d902f69094b8de129422f3e25139
1 '\" te
2 .\" Copyright (c) 2008, Sun Microsystems, Inc.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH LOGINDEVPERM 4 "Sep 25, 2008"
7 .SH NAME
8 logindevperm, fbtab \- login-based device permissions
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fB/etc/logindevperm\fR
13 .fi
15 .SH DESCRIPTION
16 .sp
17 .LP
18 The \fB/etc/logindevperm\fR file contains information that is used by
19 \fBlogin\fR(1) and \fBttymon\fR(8) to change the owner, group, and permissions
20 of devices upon logging into or out of a console device. By default, this file
21 contains lines for the keyboard, mouse, audio, and frame buffer devices.
22 .sp
23 .LP
24 The owner of the devices listed in \fB/etc/logindevperm\fR is set to the owner
25 of the console by \fBlogin\fR(1). The group of the devices is set to the
26 owner's group specified in \fB/etc/passwd\fR. The permissions are set as
27 specified in \fB/etc/logindevperm\fR.
28 .sp
29 .LP
30 If the console is \fB/dev/vt/active\fR, the owner of the devices is the first
31 user logged in on the consoles (\fB/dev/console\fR or \fB/dev/vt/#\fR). Upon
32 this first user's logout the owner and group of these devices is reset by
33 \fBttymon\fR(8) to owner root and root's group as specified in
34 \fB/etc/passwd\fR.
35 .sp
36 .LP
37 Fields are separated by a TAB or SPACE characters. Blank lines and comments can
38 appear anywhere in the file; comments start with a hashmark, (\fB#\fR), and
39 continue to the end of the line.
40 .sp
41 .LP
42 The first field specifies the name of a console device (for example,
43 \fB/dev/console\fR). By default, it is \fB/dev/vt/active\fR, which points to
44 the current active console, including \fB/dev/console\fR and all virtual
45 consoles (\fB/dev/vt/#\fR). The second field specifies the permissions to which
46 the devices in the \fIdevice_list\fR field (third field) are set. These
47 permissions must be expressed in octal format, for example, \fB0774\fR. A
48 \fIdevice_list\fR is a colon-separated list of device names. A device name must
49 be a \fB/dev\fR link.
50 .sp
51 .LP
52 A directory or logical name in the device name can be either one of the
53 following:
54 .RS +4
55 .TP
56 .ie t \(bu
57 .el o
58 A fully qualified name, for example, \fBfbs\fR.
59 .RE
60 .RS +4
61 .TP
62 .ie t \(bu
63 .el o
64 A regular expression, for example, \fB[a-z0-9.]+\fR. See \fBregexp\fR(5) for
65 more information on regular expressions.
66 .RE
67 .RS +4
68 .TP
69 .ie t \(bu
70 .el o
71 The wildcard character \fB*\fR specifying all directory or node names (except
72 \fB\&.\fR and \fB\&..\fR, for example, \fB/dev/fbs/*\fR specifies all frame
73 buffer devices.
74 .RE
75 .sp
76 .LP
77 Some examples of \fB/etc/logindevperm\fR file entries include:
78 .sp
79 .in +2
80 .nf
81 /dev/usb/[0-9a-f]+[.][0-9a-f]+/[0-9]+/[a-z0-9.]+
82 /dev/usb/[0-9a-f]+[.][0-9a-f]+/[0-9]+/*
83 /dev/usb/[0-9a-f]+[.][0-9a-f]+/*/*
84 .fi
85 .in -2
87 .sp
88 .LP
89 Specify all \fBugen\fR(7D) endpoints and status nodes.
90 .sp
91 .LP
92 Drivers can also be specified to limit the permission changes to minor nodes
93 owned by the specified drivers. For example,
94 .sp
95 .in +2
96 .nf
97 /dev/console    0600    /dev/usb/[0-9a-f]+[.][0-9a-f]+/[0-9]+/* \e
98 driver=usb_mid,scsa2usb,usbprn  # libusb devices
99 .fi
100 .in -2
104 Due to the persistence of \fBdevfs\fR(7FS) minor node management, the user
105 should be logged in as root if the list of minor nodes will be reduced and the
106 devices should all be plugged in.
109 Once the devices are owned by the user, their permissions and ownership can be
110 changed using \fBchmod\fR(1) and \fBchown\fR(1), as with any other user-owned
111 file.
114 Upon logout the owner and group of these devices are reset by \fBttymon\fR(8)
115 to owner \fBroot\fR and root's group as specified in \fB/etc/passwd\fR
116 (typically \fBother\fR). The permissions are set as specified in the
117 \fB/etc/logindevperm\fR file.
118 .SH FILES
120 .ne 2
122 \fB\fB/etc/passwd\fR\fR
124 .RS 15n
125 File that contains user group information.
128 .SH SEE ALSO
131 \fBchmod\fR(1), \fBchown\fR(1), \fBlogin\fR(1), \fBttymon\fR(8),
132 \fBpasswd\fR(4), \fBregexp\fR(5), \fBugen\fR(7D)
133 .SH NOTES
136 \fB/etc/logindevperm\fR provides a superset of the functionality provided by
137 \fB/etc/fbtab\fR in SunOS 4.\fIx\fR releases.