-
Notifications
You must be signed in to change notification settings - Fork 0
/
idmap.examples
45 lines (35 loc) · 1.2 KB
/
idmap.examples
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# examples for libnss_idmap config
# /etc/nss.d/idmap
# user with uid=1000 will be shown as he has uid=2000
uid 1000 to 2000
# same goes for GIDs
gid 1234 to 5432
# mapping based on names
user john to 1234
group accounting to 4000
# range mapping is also supported
# here uid 2000 goes to 3000, 2001 to 3001, etc, 2100 to 3100
uid 2000-2100 to 3000-
gid 1100-1499 to 1500-
# don't show user with uid=2000
# this is useful to prevent two users with the same UID
uid 1000 to 2000
uid 2000 hide
# you can swap two UIDs
uid 1000 to 2000
uid 2000 to 1000
# let the replacement UID be a file's owner UID
uid 1000 as /home/{NAME} or retain
# these template variables are supported:
# {NAME} substitutes to the user/group name
# {ID} substitutes to the user/group ID
uid 1000 as /etc/nss.d/idmap.d/uid/{ID} or retain
gid 1000 as /etc/nss.d/idmap.d/gid/{ID} or retain
# if the file is not found (or can not be stat(2)'ed),
# then do not do mapping, just keep the UID
uid 1234 as /home/{NAME} or retain
# if the file is not found, then hide the queried user
uid 1234 as /home/{NAME} or hide
# if the file is not found, then ignore this rule
# and continue processing further mapping rules
uid 1234 as /home/{NAME} or ignore