I managed to replicate and indeed
su --login ubuntu does not add the two
sbin directories to the path.
Note that for this command to work, you would need to set a password for the
ubuntu user account.
I think this is a
su issue and it is expected behavior. With
su --login ubuntu, you are asking for a login shell for a non-root user. The
sbin directories have system binaries, therefore traditionally in Unix/Linux the default $PATH for non-root accounts does not have any
sbins. Note that this is not a LXD issue. If you
su --login root, you will get the
sbin directories in the $PATH.
Also note that
su --login does not read configuration files in /etc/profile.d/ so you get even less into your $PATH.
If the reason you want to use
su --login is that
sudo --user ubuntu --login is too long, then you can use an
alias to make it shorter (
lxc mycontainer ubuntu is what you type and you get the login shell).