jdx/mise · error

bootstrap user '{name}' sets move_home without home

Error message

bootstrap user '{name}' sets move_home without home

What it means

UserRequest::from_toml rejects a user that sets move_home = true without home = "<path>". move_home asks usermod to relocate the existing home directory to a new path; with no home path declared there is no target to move to, so parsing fails with the user's name.

Source

Thrown at src/system/accounts.rs:356

        if config.state == AccountState::Absent
            && (config.uid.is_some()
                || config.group.is_some()
                || config.groups.is_some()
                || config.exclusive_groups
                || config.home.is_some()
                || config.shell.is_some()
                || config.comment.is_some()
                || config.system
                || config.create_home.is_some()
                || config.move_home)
        {
            bail!("absent bootstrap user '{name}' may only set state and remove_home");
        }
        if config.exclusive_groups && config.groups.is_none() {
            bail!("bootstrap user '{name}' sets exclusive_groups without groups");
        }
        if config.move_home && config.home.is_none() {
            bail!("bootstrap user '{name}' sets move_home without home");
        }
        if let Some(group) = &config.group {
            validate_name("group", group)?;
        }
        if let Some(path) = &config.home {
            validate_account_path(&name, "home", path)?;
        }
        if let Some(path) = &config.shell {
            validate_account_path(&name, "shell", path)?;
        }
        if config
            .comment
            .as_ref()
            .is_some_and(|comment| comment.contains([':', '\n', '\r']))
        {
            bail!("bootstrap user '{name}' comment must not contain ':', CR, or LF");
        }
        let mut groups = config

View on GitHub (pinned to 9dcfcaa0dc)

Solutions

  1. Set the target home path: home = "/home/newname" alongside move_home = true.
  2. If you only want to create the user with a home at a custom path, use create_home/home without move_home.
  3. Drop move_home if no relocation is intended.

Example fix

# before
[bootstrap.users.build]
state = "present"
group = "build"
move_home = true
# after
[bootstrap.users.build]
state = "present"
group = "build"
home = "/srv/build"
move_home = true
Defensive patterns

Strategy: validation

Validate before calling

python3 - <<'EOF'
import sys, tomllib
cfg = tomllib.load(open('mise.toml','rb'))
for name, u in cfg.get('bootstrap', {}).get('users', {}).items():
    if u.get('move_home') and 'home' not in u:
        sys.exit(f"user '{name}' sets move_home without home")
EOF

Type guard

def move_home_valid(u: dict) -> bool:
    return ('home' in u) if u.get('move_home') else True

Prevention

When it happens

Trigger: A [bootstrap.users.<name>] table containing move_home = true but no home = "/home/..." entry, read while building bootstrap account requests.

Common situations: Renaming users and dropping the home line during refactor; assuming move_home works with a home derived from the username; config templates where home is conditionally omitted.

Understand the failure class

Background: Config validation failed: what "invalid value for {key}" and settings-rejection errors mean across 19 open-source libraries — this error's family across 19 libraries.

Related errors


AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17). Data as JSON: /api/errors/5e1708404d074e6e. Report an issue: GitHub.