usermod -v( --add-sub-uids) und usermod -w( --add-sub-gids) können verwendet werden, um die Subuid- und Subgid-Bereiche für ein Benutzerkonto zu bearbeiten, aber es scheint kein Tool zu geben, das sie lediglich auflisten kann. Ist dort eines?
Zumindest auf meiner Ubuntu 14.04 Box getentscheint der Umgang mit diesen Informationen von /etc/subuidund nicht vorbereitet zu sein /etc/subgid.
Derzeit verwende ich ein kleines Shell-Skript, das awkfür diesen Zweck verwendet wird.
Hier ist ein Auszug aus usermod(8):
-v, --add-sub-uids FIRST-LAST
Add a range of subordinate uids to the users account.
[...]
-V, --del-sub-uids FIRST-LAST
Remove a range of subordinate uids from the users account.
[...]
-w, --add-sub-gids FIRST-LAST
Add a range of subordinate gids to the users account.
[...]
-W, --del-sub-gids FIRST-LAST
Remove a range of subordinate gids from the users account.
[...]