Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/initContainer: Simplify removing the user's password
It's one less invocation of an external command, which is good because spawning a new process is generally expensive. One positive side-effect of this is that on some Active Directory set-ups, the entry point no longer fails with: Error: failed to remove password for user [email protected]: failed to invoke passwd(1) ... because of: # passwd --delete [email protected] passwd: Libuser error at line: 210 - name contains invalid char `@'. This is purely an accident, and isn't meant to be an intential change to support Active Directory. Tools like useradd(8) and usermod(8) from Shadow aren't meant to work with Active Directory users, and, hence, it can still break in other ways. For that, one option is to expose $USER from the host operating system to the Toolbx container through a Varlink interface that can be used by nss-systemd inside the container. Based on an idea from Si. containers#585
- Loading branch information