On 3/30/21 2:09 PM, Karl Sinn wrote:
visudo and added this line at the end of the file:
karl ALL= NOPASSWD: /bin/su
sudo has nothing to do with su. For karl to su without a password: (1) add karl a member of the wheel group (you may have to use yast to create the wheel group a a system group. I don't recall if openSUSE has it by default -- it does in my 15.2 installs) (2) as root edit /etc/pam.d/su now uncomment the lines where it tells you to: # Uncomment the following line to implicitly trust users in the "wheel" group. auth sufficient pam_wheel.so trust use_uid # Uncomment the following line to require a user to be in the "wheel" group. auth required pam_wheel.so use_uid No restart or reboot needed, just 'su' as karl and you are root. I prefer to give root a distinguishable PS1 prompt to make it visually apparent I've su'ed to root. The following is a useful root prompt: export PS1="\[\e[1;34m\][\[\e[38;5;203m\]\A \[\e[1;34m\]\h\[\e[38;5;197m\]:\w\[\e[1;34m\]] # \[\e[0m\]" which enderes as: [03:59 valkyrie:/home/david] # (the outputer [..] are dark blue, the time is maroon, the host is blue and path is a darker-red with the root # shown in blue (with one spade behind and in frong of it. it provide a 24-hour clock and the host and directory names are in the form to simply select and use in ssh or other network paths. The hostname:/path/to/where is the format used by ssh, sftp, etc The user-prompt I use is similar, in format: export PS1="\[\e[38;5;244m\]\D{%R}\[\e[38;5;32m\] \h:\w> \[\e[0m\]" Give both a try and see if one will fit your needs. -- David C. Rankin, J.D.,P.E.