id
returns:
uid=1000(peter) gid=1000(peter) groups=1000(peter)
NOTE: On Ubuntu the uid of the first user is usually 1000.
echo 'root:1000:1' | sudo tee -a /etc/subuid /etc/subgid
lxc init ubuntu-daily:z test
lxc config set test raw.idmap 'both 1000 1000'
lxc config device add test homedir disk source=/home/peter path=/home/ubuntu
lxc start test
lxc exec test ls /home/ubuntu/
NOTE: This should display any file in the directory that was mapped.