Allow skipping the users check via sentinel

Signed-off-by: Itxaka <itxaka@kairos.io>
(cherry picked from commit b45d95c256)
This commit is contained in:
Itxaka 2025-04-04 11:27:49 +02:00
parent 2f50886ba2
commit b2ced7173f

View File

@ -213,6 +213,13 @@ func contains(s []string, str string) bool {
func (c Config) CheckForUsers() (err error) {
// If nousers is enabled we do not check for the validity of the users and such
// At this point, the config should be fully parsed and the yip stages ready
// Check if the sentinel is present
_, sentinel := c.Fs.Stat("/etc/kairos/.nousers")
if sentinel == nil {
c.Logger.Logger.Debug().Msg("Sentinel file found, skipping user check")
return nil
}
if !c.Install.NoUsers {
anyAdmin := false
cc, _ := c.Config.String()