Do you need to install a sudo package on OpenSUSE Linux?This guide is for you.
# zypper search sudoTo get information about the sudo package, run the command below;# zypper info sudo# zypper in sudo# visudoHere, ensure that the following line exists:#includedir /etc/sudoers.dNext find and comment out the following two lines so that only users in wheel group can run sudo command:#Defaults targetpw # ask for the password of the target user i.e. root#ALL ALL=(ALL) ALL # WARNING! Only use this together with 'Defaults targetpw'!After this, save and close the file.# visudo -f /etc/sudoers.d/group1-usersThen add the following config information:# Allow members of group group1 to execute any command%wheel ALL=(ALL) ALLAfter this, Save and close the file by pressing ESC followed by :x.# groupadd group1To verify it, you can use the grep command and /etc/group file as shown below:# grep ^group1 /etc/groupThen, you can add existing user named 'linuxapt' to the group1 group as follows:# usermod -aG wheel {username}# usermod -aG wheel linuxaptNext, verify it with the id command:id linuxaptsudo commandsudo command arg1 arg2sudo ls -l /etc/shadowsudo systemctl restart nginx.service To use root shell, simply execute:sudo -iFirst, install ssh keys for vivek user in your remote/locate OpenSUSE Linux server using the ssh-copy-id command:
ssh-copy-id -i ~/.ssh/id_rsa.pub linuxapt@ln.opensuseOR
ssh-copy-id -i ~/.ssh/id_ed25519.pub linuxapt@ln.opensuse
ssh linuxapt@ln.opensusesudo -iFinally, on your OpenSUSE Linux edit the /etc/ssh/sshd_config, execute:# vi /etc/ssh/sshd_configThen update the sshd_config file as shown below:## disable all password login including root user login ##ChallengeResponseAuthentication noPasswordAuthentication noPermitRootLogin noUsePAM noThen restart or reload OpenSSHD service:# systemctl restart sshd.service