Commit Graph

508 Commits

Author SHA1 Message Date
Christophe De La Fuente 9e5e57390f Land #18194, Useradd post module 2023-10-25 19:29:59 +02:00
Christophe De La Fuente 14a5aaab98 Fix small typo 2023-10-25 19:28:23 +02:00
RadioLogic e026791905 Added catch all warning to remove added groups 2023-08-30 12:15:00 -04:00
RadioLogic 8497699d53 Moved creation of new groups to its own function 2023-08-24 13:26:15 -04:00
RadioLogic 1e0ec1b0e1 Minimalize groupadd checks
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
2023-08-24 13:14:05 -04:00
RadioLogic 55c22f9848 Added some protective statements 2023-08-23 13:44:30 -04:00
RadioLogic 48acd804da Added PasswordHashType advanced option 2023-08-23 13:37:08 -04:00
RadioLogic b464b9119c Added missing newline to manual writes 2023-08-23 13:21:53 -04:00
RadioLogic 93624cca53 Moved groups section to its own function 2023-08-23 13:18:01 -04:00
RadioLogic 1bff275991 Moved manual group write to its own function 2023-08-23 13:01:22 -04:00
RadioLogic 0ae003f55b Moved os_platform to its own function 2023-08-23 12:48:01 -04:00
RadioLogic 86885e8e58 Replaced echo command in manual with append_file 2023-08-23 12:27:39 -04:00
RadioLogic 0c005a50c9 Moved creating groups towards the top implementing it only once 2023-08-23 12:23:59 -04:00
RadioLogic 85fc0f48e7 Made wrapper to command_exists? to ensure safe run 2023-08-23 11:51:14 -04:00
RadioLogic 432cdce773 Fixed condition logic to invalid groups 2023-08-22 12:53:09 -04:00
RadioLogic 7d78b52337 Got rid of binary_case variable 2023-08-22 12:46:24 -04:00
RadioLogic ee4a5a01d2 Replaced !invalid.empty? with invalid.any? 2023-08-22 12:44:16 -04:00
RadioLogic 6116fb6a8f Greatly simplified groups null check 2023-08-22 12:41:17 -04:00
RadioLogic 1604cf2134 Removed default value to groups option 2023-08-22 12:40:23 -04:00
RadioLogic c81de292d8 Setting sudomethod option to required
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
2023-08-22 12:28:35 -04:00
RadioLogic 402e25824b Making option only available based on another option
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
2023-08-22 12:26:23 -04:00
RadioLogic 2c63dfa79f Made groups regex safe
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
2023-08-22 12:25:00 -04:00
RadioLogic 737b5a46ed Fixed exist condition with ruby ninjutsu
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
2023-08-22 12:24:06 -04:00
jvoisin b79549f178 Use a better detection method for Xen
Based on @adfoster-r7's feedback.
2023-08-22 12:36:48 +02:00
jvoisin 126b5441c9 Add a bunch of virtio modules to detect KVM 2023-08-22 12:34:42 +02:00
jvoisin 995dcfd753 Be a bit more stealthy when looking at kernel modules
No need to run a binary if reading a file is enough
2023-08-22 12:34:42 +02:00
jvoisin bee2b6b381 Add detection via /proc/cpuinfo 2023-08-22 12:34:42 +02:00
jvoisin 2a5595037f Add detection via /sys/devices/virtual/dmi/id/bios_vendor 2023-08-22 12:34:42 +02:00
jvoisin cd1fc1a79c Add another Hyper-V detection 2023-08-22 12:34:42 +02:00
jvoisin 0af4e98eb6 Add some process-based detection 2023-08-22 12:34:42 +02:00
jvoisin 95b964a2f4 Add some more virtualbox kernel modules
Taken from https://www.virtualbox.org/wiki/Guest_resizing
and https://linuxconfig.org/install-virtualbox-guest-additions-on-linux-guest
2023-08-22 12:34:42 +02:00
jvoisin f84cbab0c4 Add some Hyper-v kernel modules
Taken from https://learn.microsoft.com/en-us/windows-server/virtualization/hyper-v/manage/manage-hyper-v-integration-services
2023-08-22 12:34:41 +02:00
jvoisin af22ca9253 Add detection of Xen via /proc/xen/capabilities
Xen's dom0 has `control_d` in its /proc/xen/capabilities
2023-08-22 12:34:41 +02:00
jvoisin 26b6ad2948 Add a comment 2023-08-22 12:34:41 +02:00
jvoisin 4027a6edce Add detection via /sys/class/dmi/id/sys_vendor 2023-08-22 12:34:41 +02:00
RadioLogic a024e79b6b Added change to protect groups if its unset 2023-08-21 11:36:16 -04:00
RadioLogic 6a4d3d3854 Changed bad print to warning 2023-08-14 16:20:08 -04:00
RadioLogic 6ff0c956b3 Merge branch 'master' into useradd 2023-08-14 16:13:54 -04:00
RadioLogic 5a66693ae1 Added more description to groups error 2023-08-14 16:05:37 -04:00
RadioLogic 2720027468 Added comments to manual groups 2023-08-14 15:52:54 -04:00
RadioLogic 4b9243c061 Added validation to check valid groups to add 2023-08-14 15:32:56 -04:00
RadioLogic 0550f44012 replace print status to print line 2023-08-14 15:31:42 -04:00
RadioLogic 6632993bf1 Added gid correction to manual group additions 2023-08-14 14:11:38 -04:00
RadioLogic 54fa11c822 Added new UseraddMethod argument 2023-08-11 17:58:57 -04:00
RadioLogic 5d0ea40212 Replaced if statement with clean case 2023-08-01 19:51:19 -04:00
RadioLogic c361dd9bdf Removed condition that never occurs 2023-08-01 19:48:49 -04:00
RadioLogic 594fea60ba Update modules/post/linux/manage/adduser.rb
Made some safety checks easier to read

Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
2023-08-01 15:29:08 -04:00
RadioLogic 49eeb90145 Removed pointless line 2023-07-20 19:25:09 -04:00
RadioLogic 0de59481e9 Added better means to ignore groups additions on empty set 2023-07-20 15:18:48 -04:00
RadioLogic 761f91faf0 Added quotes around password to prevent bash shebang 2023-07-20 15:17:26 -04:00