Commit Graph

540 Commits

Author SHA1 Message Date
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
RadioLogic ab5b12e8f1 Corrected sideeffects
Co-authored-by: adfoster-r7 <60357436+adfoster-r7@users.noreply.github.com>
2023-07-20 14:52:46 -04:00
RadioLogic 923cb78110 Corrected reliability
Co-authored-by: adfoster-r7 <60357436+adfoster-r7@users.noreply.github.com>
2023-07-20 14:52:27 -04:00
jvoisin 0df2f57124 Fix a typo 2023-07-19 19:47:17 +02:00
Julien Voisin d5ca174e1e Apply suggestions from code review
Co-authored-by: jheysel-r7 <Jack_Heysel@rapid7.com>
2023-07-19 17:46:27 +00:00
RadioLogic 0680630d25 Redefined verbose prints 2023-07-17 16:04:37 -04:00
RadioLogic 394ea6029a Added prevention of printing empty missing groups 2023-07-17 15:46:17 -04:00
RadioLogic 1c693d9fad Finalized /etc/shadow line 2023-07-17 15:43:28 -04:00
RadioLogic 427e39b152 Added check to prevent manual from readding users 2023-07-17 15:42:48 -04:00
RadioLogic cc9d70b896 Added missing each in manual groups 2023-07-17 15:37:50 -04:00
RadioLogic 4ff7babae7 Turned missing groups into enum 2023-07-17 15:15:53 -04:00
RadioLogic 6e6910519a Added error if custom command doesnt exist 2023-07-17 13:59:30 -04:00
RadioLogic 9bc00f7759 Implemented custom command detection 2023-07-17 13:59:09 -04:00
RadioLogic 3a3ffcb6df Swapped vprint in useradd 2023-07-17 13:58:18 -04:00
RadioLogic 7e9071627f Added better verbose logging 2023-07-17 13:35:45 -04:00
RadioLogic c63810101c Added error for illegal usernames 2023-07-17 12:47:34 -04:00
jvoisin 2efcbbb772 Add docker detection via the old .dockerinit file 2023-07-16 18:12:11 +02:00
jvoisin 1f2112c5c1 Add podman detection via an environment variable 2023-07-16 18:11:11 +02:00
jvoisin f46641f479 Improve LXC detection
See https://github.com/silverwind/ansible/commit/d649d24be2ed36ff8da7ecbd57b6bb25a9a3b745
2023-07-16 18:07:59 +02:00