]> git.ipfire.org Git - thirdparty/snapper.git/commit
Update user addition script to prevent warnings and enhance compatibility 837/head
authorDaniel <7294692+daniel-fahey@users.noreply.github.com>
Sat, 16 Sep 2023 17:42:23 +0000 (18:42 +0100)
committerGitHub <noreply@github.com>
Sat, 16 Sep 2023 17:42:23 +0000 (18:42 +0100)
commitdabec2a0d75a6055d60fb794804beccb995cf9ff
tree6104bc6ae05da43102c619ca93141b01ffa6b506
parentafc30c307e5295127f40eb0d726b9385cac72df1
Update user addition script to prevent warnings and enhance compatibility

Not sure if this script is still recommended to use as it's not been modified in nearly a decade.

1. Modified the `useradd` command by removing the `-m` option to prevent unnecessary warnings about the home directory already existing. The creation of the home directory is managed separately in this script using Btrfs subvolumes.

2. Added a command to copy the standard skeleton files from `/etc/skel` to the new user's home directory, ensuring that new users receive the necessary setup files despite the custom home directory creation process with the `create-config` command.

3. Corrected the `chown` command syntax to use the more modern `:` separator between the user and group names, getting rid of another warning.

I kept the (old school) style as is. Thanks for snapper!
scripts/pam_snapper_useradd.sh