Drop using su and configure sudo with the correct permissions. That involves editing /etc/sudoers and adding entry for allowing a user to execute a command without providing a password. You could either make it a bit advanced

linux - Why is the 'sudo' password different than the 'su As for what you were trying to do, just sudo su root, or even more simply sudo su and type your regular user password. This would roughly amount to replacing your friend's credit card credentials with your own using the legal proxy they gave you :). It of course assumes the sudo configuration allows you to run su with escalated privileges. macos - Why can't I run `su`? (and how should I do?) - Ask sudo -u someuser -i Old-school: sudo su someuser. Another approach uses the su command in combination with the sudo. The su command means “switch user”. sudo su someuser Or, to include running the user's startup scripts, add the hyphen. sudo su - someuser root user. The root user in Unix-related operating systems have absolute power to do

How to run sudo command without a password on a Linux or

sudo -u someuser -i Old-school: sudo su someuser. Another approach uses the su command in combination with the sudo. The su command means “switch user”. sudo su someuser Or, to include running the user's startup scripts, add the hyphen. sudo su - someuser root user. The root user in Unix-related operating systems have absolute power to do How to enable the root user on your Mac or change your Nov 28, 2017

Sep 07, 2019

linux - Why is the 'sudo' password different than the 'su