Skip to content

Instantly share code, notes, and snippets.

View ey3ball's full-sized avatar

Florian Vallee ey3ball

View GitHub Profile
#!/bin/bash
set -eu
_UID=$(id -u)
GID=$(id -g)
GROUP=$(id -gn)
SUBUID=root:$_UID:1
SUBGID=root:$GID:1
# give lxd permission to map your user/group id through
grep $SUBUID /etc/subuid -qs || sudo usermod --add-subuids ${_UID}-${_UID} --add-subgids ${GID}-${GID} root