Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User's home directory is changed when $managehome => false and $HOME is in non-standard location #479

Open
bschonec opened this issue Mar 22, 2024 · 0 comments

Comments

@bschonec
Copy link
Contributor

bschonec commented Mar 22, 2024

Describe the Bug

Even when managehome => false, the non-root user's home directory will be changed if the user's home directory is in a non-standard location.

Expected Behavior

User's home directory shouldn't be changed when managehome=>false under any circumstances.

Steps to Reproduce

Steps to reproduce the behavior:

1. useradd -m -d /mnt/brian brian
Accounts::User{'brian':
  ensure => present,
  managehome => false,
}
Accounts::User[brian]/User[brian]/home: home changed '/mnt/brian' to '/home/brian' (corrective)

Environment

  • Pppet 7.29.1
  • Red Hat EL 8.8
  • puppetlabs-accounts@main (08c59a4)

Additional Context

I think that the user defined type wrongly assumes that all account home directories will be under /home/${name}. There are some instances where this is not the case, such as the mongod user provide by mogodb-enterprise-server package.

One workaround is to provide the $home => /path/to/real/homedir to the user defined type but this is a bit clunky.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants