Hi, On Tue, Mar 08, 2022 at 07:16:57PM +0900, Osamu Aoki wrote: > I was thinking opt-in only. > > I mean to add an opt-in --btrfs-subvolume-home option to adduser so > the user can use this feature if he requests. I didn't think beyond. > (I didn't test it on non-btrfs system so I don't know the answer to > your question. Whoever specifies it in command line, he should know > it.)
I had a sane default in mind. As times have changed and maintainer / developer resources are scarce, adduser primarily sees itself as a policy wrapper to help package maintainers to create their package accounts in their maintainer scripts without violating policy. Offering account creation capabilities to the local admin has been pushed into the background in the last decades. I'd say then if the local admin wants to use a feature that adduser doesnt offer, they are free to use other tools such as useradd directly to get what they want. > As I come to think of this, since it is trivial to check FS of /home > in adduser in advance by calling a basic shell command as: > > ``` $ stat -f -c %T /home btrfs ``` , adding this feature as an > automatic option for pertinent system is an interesting thought for > adduser too. I am reluctant to add filesystem specific code to adduser, as writing automated tests is probably hard. I would think more about adding this if having account-specific btrfs subvolumes per _system_ account would be a valid feature to have AND if useradd is smart enough to not error out or spew warnings if one tries to create a btrfs subvolume on non-btrfs volumes. At th moment, I am not convinced that this is worth spending developer / maintainer time on. Would it help to have an "useradd-extra-options" command line option and configuration file setting that causes their respective contents to be added to useradd's command line verbatim? Which other commands would need a respective foo-extra-options option? Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don't trust Computers. They | Mailadresse im Header Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402 Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421