diff options
| author | Brian Cully <bjc@spork.org> | 2023-07-18 10:06:16 -0400 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2023-08-10 09:26:08 +0200 |
| commit | 8a88b8b0b5924f8ed00a49e79714cb005cffc7cb (patch) | |
| tree | 4faf6c0127bb5c17310b9e4c785344ddca0a5145 /doc | |
| parent | 90e34d25d5e7c14b7f3293a78f3cdad676c0d035 (diff) | |
services: Add pam-mount-volume-service-type.
The `pam-mount-volumes-service-type' adds additional volumes to the
pam-mount-service-type in addition to any that are already specified in
`pam-mount-rules'.
* doc/guix.texi (PAM Mount Volume Service): add documentation for
`pam-mount-service-type'.
* gnu/services/pam-mount.scm: new file.
* Makefile.am: add pam-mount tests
* tests/services/pam-mount.scm: new tests
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/guix.texi | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 65ca18a1be4..71f9f291694 100644 --- a/doc/guix.texi +++ b/doc/guix.texi | |||
| @@ -116,6 +116,7 @@ Copyright @copyright{} 2022 Antero Mejr@* | |||
| 116 | Copyright @copyright{} 2023 Karl Hallsby@* | 116 | Copyright @copyright{} 2023 Karl Hallsby@* |
| 117 | Copyright @copyright{} 2023 Nathaniel Nicandro@* | 117 | Copyright @copyright{} 2023 Nathaniel Nicandro@* |
| 118 | Copyright @copyright{} 2023 Tanguy Le Carrour@* | 118 | Copyright @copyright{} 2023 Tanguy Le Carrour@* |
| 119 | Copyright @copyright{} 2023 Brian Cully@* | ||
| 119 | 120 | ||
| 120 | Permission is granted to copy, distribute and/or modify this document | 121 | Permission is granted to copy, distribute and/or modify this document |
| 121 | under the terms of the GNU Free Documentation License, Version 1.3 or | 122 | under the terms of the GNU Free Documentation License, Version 1.3 or |
| @@ -37927,6 +37928,104 @@ The complete list of possible options can be found in the man page for | |||
| 37927 | @end table | 37928 | @end table |
| 37928 | @end deftp | 37929 | @end deftp |
| 37929 | 37930 | ||
| 37931 | @subheading PAM Mount Volume Service | ||
| 37932 | @cindex pam volume mounting | ||
| 37933 | |||
| 37934 | PAM mount volumes are automatically mounted at login by the PAM login | ||
| 37935 | service according to a set of per-volume rules. Because they are | ||
| 37936 | mounted by PAM the password entered during login may be used directly to | ||
| 37937 | mount authenticated volumes, such as @code{cifs}, using the same | ||
| 37938 | credentials. | ||
| 37939 | |||
| 37940 | These volumes will be added in addition to any volumes directly | ||
| 37941 | specified in @code{pam-mount-rules}. | ||
| 37942 | |||
| 37943 | Here is an example of a rule which will mount a remote CIFS share from | ||
| 37944 | @file{//remote-server/share} into a sub-directory of @file{/shares} | ||
| 37945 | named after the user logging in: | ||
| 37946 | |||
| 37947 | @lisp | ||
| 37948 | (simple-service 'pam-mount-remote-share pam-mount-volume-service-type | ||
| 37949 | (list (pam-mount-volume | ||
| 37950 | (secondary-group "users") | ||
| 37951 | (file-system-type "cifs") | ||
| 37952 | (server "remote-server") | ||
| 37953 | (file-name "share") | ||
| 37954 | (mount-point "/shares/%(USER)") | ||
| 37955 | (options "nosuid,nodev,seal,cifsacl")))) | ||
| 37956 | @end lisp | ||
| 37957 | |||
| 37958 | @deftp {Data Type} pam-mount-volume-service-type | ||
| 37959 | Configuration for a single volume to be mounted. Any fields not | ||
| 37960 | specified will be omitted from the run-time PAM configuration. See | ||
| 37961 | @uref{http://pam-mount.sourceforge.net/pam_mount.conf.5.html, | ||
| 37962 | the man page} for the default values when unspecified. | ||
| 37963 | |||
| 37964 | @table @asis | ||
| 37965 | @item @code{user-name} (type: maybe-string) | ||
| 37966 | Mount the volume for the given user. | ||
| 37967 | |||
| 37968 | @item @code{user-id} (type: maybe-integer-or-range) | ||
| 37969 | Mount the volume for the user with this ID. This field may also be | ||
| 37970 | specified as a pair of @code{(start . end)} indicating a range of user | ||
| 37971 | IDs for whom to mount the volume. | ||
| 37972 | |||
| 37973 | @item @code{primary-group} (type: maybe-string) | ||
| 37974 | Mount the volume for users with this primary group name. | ||
| 37975 | |||
| 37976 | @item @code{group-id} (type: maybe-integer-or-range) | ||
| 37977 | Mount the volume for the users with this primary group ID. This field | ||
| 37978 | may also be specified as a cons cell of @code{(start . end)} indicating | ||
| 37979 | a range of group ids for whom to mount the volume. | ||
| 37980 | |||
| 37981 | @item @code{secondary-group} (type: maybe-string) | ||
| 37982 | Mount the volume for users who are members of this group as either a | ||
| 37983 | primary or secondary group. | ||
| 37984 | |||
| 37985 | @item @code{file-system-type} (type: maybe-string) | ||
| 37986 | The file system type for the volume being mounted (e.g., @code{cifs}) | ||
| 37987 | |||
| 37988 | @item @code{no-mount-as-root?} (type: maybe-boolean) | ||
| 37989 | Whether or not to mount the volume with root privileges. This is | ||
| 37990 | normally disabled, but may be enabled for mounts of type @code{fuse}, or | ||
| 37991 | other user-level mounts. | ||
| 37992 | |||
| 37993 | @item @code{server} (type: maybe-string) | ||
| 37994 | The name of the remote server to mount the volume from, when necessary. | ||
| 37995 | |||
| 37996 | @item @code{file-name} (type: maybe-string) | ||
| 37997 | The location of the volume, either local or remote, depending on the | ||
| 37998 | @code{file-system-type}. | ||
| 37999 | |||
| 38000 | @item @code{mount-point} (type: maybe-string) | ||
| 38001 | Where to mount the volume in the local file-system. This may be set to | ||
| 38002 | @file{~} to indicate the home directory of the user logging in. If this | ||
| 38003 | field is omitted then @file{/etc/fstab} is consulted for the mount | ||
| 38004 | destination. | ||
| 38005 | |||
| 38006 | @item @code{options} (type: maybe-string) | ||
| 38007 | The options to be passed as-is to the underlying mount program. | ||
| 38008 | |||
| 38009 | @item @code{ssh?} (type: maybe-boolean) | ||
| 38010 | Enable this option to pass the login password to SSH for use with mounts | ||
| 38011 | involving SSH (e.g., @code{sshfs}). | ||
| 38012 | |||
| 38013 | @item @code{cipher} (type: maybe-string) | ||
| 38014 | Cryptsetup cipher name for the volume. To be used with the @code{crypt} | ||
| 38015 | @code{file-system-type}. | ||
| 38016 | |||
| 38017 | @item @code{file-system-key-cipher} (type: maybe-string) | ||
| 38018 | Cipher name used by the target volume. | ||
| 38019 | |||
| 38020 | @item @code{file-system-key-hash} (type: maybe-string) | ||
| 38021 | SSL hash name used by the target volume. | ||
| 38022 | |||
| 38023 | @item @code{file-system-key-file-name} (type: maybe-string) | ||
| 38024 | File name of the file system key for the target volume. | ||
| 38025 | |||
| 38026 | @end table | ||
| 38027 | @end deftp | ||
| 38028 | |||
| 37930 | 38029 | ||
| 37931 | @node Guix Services | 38030 | @node Guix Services |
| 37932 | @subsection Guix Services | 38031 | @subsection Guix Services |
