1logindevperm(4) File Formats logindevperm(4)
2
3
4
6 logindevperm, fbtab - login-based device permissions
7
9 /etc/logindevperm
10
11
13 The /etc/logindevperm file contains information that is used by
14 login(1) and ttymon(1M) to change the owner, group, and permissions of
15 devices upon logging into or out of a console device. By default, this
16 file contains lines for the keyboard, mouse, audio, and frame buffer
17 devices.
18
19
20 The owner of the devices listed in /etc/logindevperm is set to the
21 owner of the console by login(1). The group of the devices is set to
22 the owner's group specified in /etc/passwd. The permissions are set as
23 specified in /etc/logindevperm.
24
25
26 If the console is /dev/vt/active, the owner of the devices is the first
27 user logged in on the consoles (/dev/console or /dev/vt/#). Upon this
28 first user's logout the owner and group of these devices is reset by
29 ttymon(1M) to owner root and root's group as specified in /etc/passwd.
30
31
32 Fields are separated by a TAB or SPACE characters. Blank lines and com‐
33 ments can appear anywhere in the file; comments start with a hashmark,
34 (#), and continue to the end of the line.
35
36
37 The first field specifies the name of a console device (for example,
38 /dev/console). By default, it is /dev/vt/active, which points to the
39 current active console, including /dev/console and all virtual consoles
40 (/dev/vt/#). The second field specifies the permissions to which the
41 devices in the device_list field (third field) are set. These permis‐
42 sions must be expressed in octal format, for example, 0774. A
43 device_list is a colon-separated list of device names. A device name
44 must be a /dev link.
45
46
47 A directory or logical name in the device name can be either one of the
48 following:
49
50 o A fully qualified name, for example, fbs.
51
52 o A regular expression, for example, [a-z0-9.]+. See regexp(5)
53 for more information on regular expressions.
54
55 o The wildcard character * specifying all directory or node
56 names (except . and .., for example, /dev/fbs/* specifies
57 all frame buffer devices.
58
59
60 Some examples of /etc/logindevperm file entries include:
61
62 /dev/usb/[0-9a-f]+[.][0-9a-f]+/[0-9]+/[a-z0-9.]+
63 /dev/usb/[0-9a-f]+[.][0-9a-f]+/[0-9]+/*
64 /dev/usb/[0-9a-f]+[.][0-9a-f]+/*/*
65
66
67
68 Specify all ugen(7D) endpoints and status nodes.
69
70
71 Drivers can also be specified to limit the permission changes to minor
72 nodes owned by the specified drivers. For example,
73
74 /dev/console 0600 /dev/usb/[0-9a-f]+[.][0-9a-f]+/[0-9]+/* \
75 driver=usb_mid,scsa2usb,usbprn # libusb devices
76
77
78
79 Due to the persistence of devfs(7FS) minor node management, the user
80 should be logged in as root if the list of minor nodes will be reduced
81 and the devices should all be plugged in.
82
83
84 Once the devices are owned by the user, their permissions and ownership
85 can be changed using chmod(1) and chown(1), as with any other user-
86 owned file.
87
88
89 Upon logout the owner and group of these devices are reset by tty‐
90 mon(1M) to owner root and root's group as specified in /etc/passwd
91 (typically other). The permissions are set as specified in the
92 /etc/logindevperm file.
93
95 /etc/passwd File that contains user group information.
96
97
99 chmod(1), chown(1), login(1), ttymon(1M), passwd(4), regexp(5),
100 ugen(7D)
101
103 /etc/logindevperm provides a superset of the functionality provided by
104 /etc/fbtab in SunOS 4.x releases.
105
106
107
108SunOS 5.11 25 Sep 2008 logindevperm(4)