Comments on: How to Create and Use Linux sudo Command https://www.tecmint.com/sudo-command-linux/ Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks. Mon, 24 Jun 2024 04:42:03 +0000 hourly 1 By: Ravi Saive https://www.tecmint.com/sudo-command-linux/comment-page-1/#comment-2183605 Mon, 24 Jun 2024 04:42:03 +0000 https://www.tecmint.com/?p=32159#comment-2183605 In reply to Jorge.

@Jorge,

Thanks for the tip! I’ll start using `sudoedit` for a more secure approach.

]]>
By: Jorge https://www.tecmint.com/sudo-command-linux/comment-page-1/#comment-2182585 Fri, 21 Jun 2024 04:54:24 +0000 https://www.tecmint.com/?p=32159#comment-2182585 Actually, the correct way to edit files with sudo is the command `sudoedit file` or `sudo -e file`. It needs the EDITOR environment variable to be set.

It runs your favorite editor (nano, kate, neovim, etc.) as an ordinary user but allows you to modify the root file in a secure way.

When you use `sudo nano`, you are running the editor as the root user, and that’s not good at all.

]]>
By: dragonmouth https://www.tecmint.com/sudo-command-linux/comment-page-1/#comment-2180367 Fri, 14 Jun 2024 12:15:44 +0000 https://www.tecmint.com/?p=32159#comment-2180367 In reply to Ravi Saive.

Yes, I realize this but the install commands as given in the article will not work:

sudo apt install sudo

will generate a sudoers file error.

On the other hand, if you are using the root account to install sudo, the leading ‘sudo‘ in the command will generate a “sudo command not found” error.

]]>
By: Ravi Saive https://www.tecmint.com/sudo-command-linux/comment-page-1/#comment-2180261 Fri, 14 Jun 2024 04:13:41 +0000 https://www.tecmint.com/?p=32159#comment-2180261 In reply to dragonmpouth.

@dragonmouth,

If you do not have sudo pre-installed on your system, you can still manage to install it or add a user to the sudo group by logging in as the root user.

su -
apt-get update
apt-get install sudo
usermod -aG sudo username
sudo whoami
]]>
By: dragonmpouth https://www.tecmint.com/sudo-command-linux/comment-page-1/#comment-2180012 Thu, 13 Jun 2024 11:25:08 +0000 https://www.tecmint.com/?p=32159#comment-2180012 If you do not have ‘sudo’ pre-installed on your system, how can you use it to install ‘sudo” or to add a user to the sudo group?

]]>