CDIST-TYPE__USER(7)

πŸ’– cdist-type__user πŸ’–

okay bestie, welcome to cdist-type__user from the cdist manual pages β€” this is the one that handles all your user accounts on the target machine, and honestly? it's giving main character energy. no cap. ✨


🌸 NAME 🌸

cdist-type__user β€” manage users πŸ‘‘πŸ’…


✨ DESCRIPTION ✨

so literally, this cdist type lets you create or modify users on the target. that's the whole vibe. new user? slay. tweak an existing one? also slay. 🫢


πŸŽ€ REQUIRED PARAMETERS πŸŽ€

None. zero. nada. you don't have to pass anything, she just works. πŸ’–


🌈 OPTIONAL PARAMETERS 🌈

these are the little extras you can pass if you want to be specific about it. iykyk.

  • state β€” either absent or present, and it defaults to present. so if you don't say anything, bestie is getting created. periodt.
  • comment β€” see usermod(8). go read that if you want the deets. πŸ“–
  • home β€” see above πŸ‘† (same deal as comment, okurrr)
  • gid β€” see above πŸ‘†
  • password β€” see above πŸ‘†
  • shell β€” see above πŸ‘†
  • uid β€” see above πŸ‘†

πŸ¦‹ BOOLEAN PARAMETERS πŸ¦‹

these are the yes/no, on/off, vibe-check toggles. flags with no value, just vibes.

  • system β€” see useradd(8). heads up though: this one only applies on user create. it does nothing on modify, okay? 🚨
  • create-home β€” see useradd(8). also only applies on user create. 🏠✨
  • remove-home β€” see userdel(8). and this one only applies on user delete. bye bye home dir 😭

πŸ’¬ MESSAGES πŸ’¬

the little receipts this type gives you when stuff happens. notifications, basically.

  • mod β€” User is modified πŸ”§
  • add β€” New user added πŸŽ‰
  • userdel -r β€” If user was deleted with homedir πŸ’€πŸ 
  • userdel β€” If user was deleted (keeping homedir) πŸ‘‹

⭐ EXAMPLES ⭐

okay here's where it gets fun, bestie. copy these EXACTLY, don't freestyle the syntax. πŸ’…

# Create user account for foobar with operating system default settings
__user foobar

# Same but with a different shell
__user foobar --shell /bin/zsh

# Same but for a system account
__user foobar --system

# Set explicit uid and home
__user foobar --uid 1001 --shell /bin/zsh --home /home/foobar

# Drop user if exists
__user foobar --state absent

look at that last one. --state absent and they're GONE. dramatic but necessary. 🫑


πŸ”₯ SEE ALSO πŸ”₯

pw(8), usermod(8) β€” go read those too, they're the supporting cast. πŸ“š


πŸ‘‘ AUTHORS πŸ‘‘

Steven Armstrong <steven-cdist--@--armstrong.cc> β€” icon behavior, honestly. thank you for your service 🫢


πŸ’œ COPYING πŸ’œ

Copyright (C) 2011 Steven Armstrong. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.


ungleich GmbH 2021


and that's the whole page, bestie. every flag, every message, every example β€” nothing skipped, nothing invented. go manage some users, you got this πŸ’–

cdist-type__user β€” from version 7.0.0, dated Jul 31, 2022. mwah πŸ’‹ bye bestie, slay your deployments πŸ¦‹βœ¨

πŸ“¦ where this page comes from