<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>sudo Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/sudo/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Tue, 17 Aug 2021 21:13:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>How to change the default sudo timeout?</title>
		<link>https://www.osradar.com/how-to-change-the-default-sudo-timeout/</link>
					<comments>https://www.osradar.com/how-to-change-the-default-sudo-timeout/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Wed, 26 Feb 2020 00:13:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=18296</guid>

					<description><![CDATA[<p>Many times when working with sudo, we notice that it asks for a user password to execute the commands. However, after a while, if we want to use sudo again, we have to type it again. This is a security measure. Today I will show you how to change the default sudo timeout. So, sudo [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-change-the-default-sudo-timeout/">How to change the default sudo timeout?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Many times when working with sudo, we notice that it asks for a user password to execute the commands. However, after a while, if we want to use sudo again, we have to type it again. This is a security measure. <strong>Today I will show you how to change the default sudo timeout.</strong></p>
<p><span title="">So, <a href="https://www.sudo.ws/" rel="noopener">sudo</a> program is part of the GNU suite.</span> <span title="">It is a small application that allows the execution of commands with the security privileges of another user.</span> <span title="">Normally, this “other” user is root.</span></p>
<p>Generally, Ubuntu-based distributions have sudo enabled. Although this is a security breach for many, it makes life much easier for newcomers.</p>
<p>On the other hand, the more server-oriented distributions like Debian, CentOS or RHEL do not even have it installed.</p>
<p><a href="https://www.osradar.com/how-to-enable-sudo-on-debian-10/" target="_blank" rel="noopener noreferrer">How to enable sudo on Debian 10?</a></p>
<p>However, sudo has a grace period. This is that after entering the password, there is a time when you can execute another command without entering the password again.</p>
<p>The previous situation implies a security breach. This has to be said. That&#8217;s why it&#8217;s possible to change that time to a shorter or a longer one.</p>
<h2>Chaging the default sudo timeout</h2>
<p>First, open a terminal session.</p>
<p>All sudo settings are stored in the <code>/etc/sudoers</code> file and need to be modified.</p>
<p>To do so, run the following command:</p>
<pre>:~$ sudo nano /etc/sudoers</pre>
<p>In this case I&#8217;m using a text editor called nano, but you can also use one with a graphical interface.</p>
<p>Once inside the file, you have to place the next line:</p>
<div class="showyourterms ubuntu nostatusbar" data-title="masLinuXBlog">
<div>
<pre class="line" data-line="0">Defaults&nbsp;env_reset,timestamp_timeout=</pre>
</div>
</div>
<p>However, in some Linux distributions that line does not exist, so you can add it at the end of the file and with the value in minutes you want. For example 1 for one minute.</p>
<p>In case you don&#8217;t want to be asked for the password anymore you can put the value one. Clearly this is not recommended at all.</p>
<pre>Defaults env_reset,timestamp_timeout=1</pre>
<figure id="attachment_18367" aria-describedby="caption-attachment-18367" style="width: 904px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-18367" src="https://www.osradar.com/wp-content/uploads/2020/02/1-11.png" alt="1.- Change the default sudo timeout" width="904" height="372" srcset="https://www.osradar.com/wp-content/uploads/2020/02/1-11.png 904w, https://www.osradar.com/wp-content/uploads/2020/02/1-11-300x123.png 300w, https://www.osradar.com/wp-content/uploads/2020/02/1-11-768x316.png 768w, https://www.osradar.com/wp-content/uploads/2020/02/1-11-696x286.png 696w" sizes="(max-width: 904px) 100vw, 904px" /><figcaption id="caption-attachment-18367" class="wp-caption-text">1.- Change the default sudo timeout</figcaption></figure>
<p>Then save the changes and close the file.</p>
<p>And it&#8217;s done. Now after one minute, if you use another command with sudo, you will be asked for the password again.</p>
<h2>Conclusion</h2>
<p>Sudo is an unloved tool by many syadmin for being unsafe, but it is true that for a normal user of the system, it is a great advantage. Today you have learned how to modify the grace time it gives us without asking for the password.</p>
<p>Please share this post with your friends and join our <a href="https://t.me/osradar" target="_blank" rel="noopener noreferrer">Telegram channel</a>.</p>


<p></p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-change-the-default-sudo-timeout/">How to change the default sudo timeout?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-change-the-default-sudo-timeout/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to enable sudo on FreeBSD 12?</title>
		<link>https://www.osradar.com/enable-sudo-on-freebsd-12/</link>
					<comments>https://www.osradar.com/enable-sudo-on-freebsd-12/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Sun, 09 Feb 2020 00:00:00 +0000</pubDate>
				<category><![CDATA[Servers]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=18024</guid>

					<description><![CDATA[<p>Hello, friends in this post I will show you how to enable sudo in FreeBSD 12. We like Linux but also FreeBSD for its robustness and for being another valid alternative for servers. What is sudo? In a PC that runs some Linux distribution or FreeBSD, there are different users. Each of them has defined [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/enable-sudo-on-freebsd-12/">How to enable sudo on FreeBSD 12?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Hello, friends in this post <strong>I will show you how to enable sudo in FreeBSD 12</strong>. We like Linux but also FreeBSD for its robustness and for being another valid alternative for servers.</p>
<h2>What is sudo?</h2>
<div class="text-wrap tlid-copy-target">
<div class="result-shield-container tlid-copy-target" tabindex="0">
<p><span class="tlid-translation translation" lang="en"><span class="" title="">In a PC that runs some Linux distribution or <a href="https://www.osradar.com/install-tomcat-9-in-freebsd12/" target="_blank" rel="noopener noreferrer">FreeBSD</a>, there are different users.</span> <span class="" title="">Each of them has defined roles and permits.</span> <span class="" title="">For example, to install a package in FreeBSD it is necessary to do it with root user privileges.</span> <span class="" title="">Then, not all users can do all things.</span></span></p>
<p><span title="">The <a href="https://www.sudo.ws/" rel="noopener">sudo</a> program is part of the GNU suite.</span> <span title="">It is a small application that allows the execution of commands with the security privileges of another user.</span> <span title="">Normally, this “other” user is root.</span></p>
<p><span title="">By FreeBSD security policy, this program is not enabled for your regular user.</span> <span class="" title="">And the truth is that if you use FreeBSD on your personal computer we can enable it and it would not be a problem.</span> <span title="">However, if you install FreeBSD to be used on a server, you should not do it.</span></p>
<p><span title="">In any case, sudo allows you to execute commands that your user can not.</span> <span title="">In addition, the commands that are applied with sudo are not registered in the system log.</span></p>
<h2>Enabling sudo on FreeBSD 12</h2>
<p>We already know that sudo is not installed by default on FreeBSD, but it is available from the official repositories. So first log in as root on FreeBSD.</p>
<p>After you have opened the terminal session as the root user, install sudo with the following command:</p>
<pre>:~$ pkg install sudo
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
	sudo: 1.8.31
Number of packages to be installed: 1
The process will require 3 MiB more space.
730 KiB to be downloaded.
Proceed with this action? [y/N]:</pre>
<p><figure id="attachment_18044" aria-describedby="caption-attachment-18044" style="width: 645px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-18044" src="https://www.osradar.com/wp-content/uploads/2020/02/1-2.png" alt="1.- Install sudo on FreeBSD 12" width="645" height="275" srcset="https://www.osradar.com/wp-content/uploads/2020/02/1-2.png 645w, https://www.osradar.com/wp-content/uploads/2020/02/1-2-300x128.png 300w" sizes="(max-width: 645px) 100vw, 645px" /><figcaption id="caption-attachment-18044" class="wp-caption-text">1.- Install sudo on FreeBSD 12</figcaption></figure></p>
<p>Once you have installed sudo, you need to add your user to the list of users who can run sudo.</p>
<p>To do this, first install the nano text editor which is easier to use than vi.</p>
<pre>:~$ pkg install nano</pre>
<p>And now we have to edit the sudo configuration file.</p>
<pre>:~$ nano /usr/local/etc/sudoers</pre>
<p>Now under the line:</p>
<pre>root ALL=(ALL) ALL</pre>
<p>Add the next line:</p>
<pre>angelo ALL=(ALL) ALL</pre>
<p>In this case, <strong>angelo</strong> is my username. Replace it with yours.</p>
<p><figure id="attachment_18045" aria-describedby="caption-attachment-18045" style="width: 676px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-18045" src="https://www.osradar.com/wp-content/uploads/2020/02/2-2.png" alt="2.- Enabling sudo on FreeBSD 12" width="676" height="323" srcset="https://www.osradar.com/wp-content/uploads/2020/02/2-2.png 676w, https://www.osradar.com/wp-content/uploads/2020/02/2-2-300x143.png 300w" sizes="(max-width: 676px) 100vw, 676px" /><figcaption id="caption-attachment-18045" class="wp-caption-text">2.- Enabling sudo on FreeBSD 12</figcaption></figure></p>
<p>Save your changes with CTRL + O and close the editor with CTRL + X.</p>
<p>Now you can log out as root and log in with your regular user.</p>
<p>The first time you run a command with sudo, such as updating the system, you will see something like this:</p>
<p><figure id="attachment_18046" aria-describedby="caption-attachment-18046" style="width: 801px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-18046" src="https://www.osradar.com/wp-content/uploads/2020/02/3-2.png" alt="3.- testing sudo" width="801" height="228" srcset="https://www.osradar.com/wp-content/uploads/2020/02/3-2.png 801w, https://www.osradar.com/wp-content/uploads/2020/02/3-2-300x85.png 300w, https://www.osradar.com/wp-content/uploads/2020/02/3-2-768x219.png 768w, https://www.osradar.com/wp-content/uploads/2020/02/3-2-696x198.png 696w" sizes="(max-width: 801px) 100vw, 801px" /><figcaption id="caption-attachment-18046" class="wp-caption-text">3.- testing sudo</figcaption></figure></p>
<p>Just enter your password and the command will be executed.</p>
<p>Remember that sudo opens a security hole. So normally it is not recommended to use it on servers. But still, it can be very useful to keep it in mind.</p>
<p>And that&#8217;s it, now you can use sudo in FreeBSD 12.</p>
<h2>Conclusion</h2>
<p>Many times we need to execute various commands as the root user to perform operations on our Unix-based systems. However, we do not always have access to the root user and thanks to sudo we can do it. On the other hand, sudo is not always enabled in production environments.</p>
<p>Now you know how to enable sudo in <a href="https://www.osradar.com/tag/freebsd/" target="_blank" rel="noopener noreferrer">FreeBSD</a> 12.</p>
</div>
</div>
<p>The post <a rel="nofollow" href="https://www.osradar.com/enable-sudo-on-freebsd-12/">How to enable sudo on FreeBSD 12?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/enable-sudo-on-freebsd-12/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Discovered vulnerability in sudo. Upgrade your system now!</title>
		<link>https://www.osradar.com/discovered-vulnerability-sudo/</link>
					<comments>https://www.osradar.com/discovered-vulnerability-sudo/#comments</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Tue, 15 Oct 2019 15:46:15 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[What's Hot]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[new]]></category>
		<category><![CDATA[New version]]></category>
		<category><![CDATA[opensuse]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[SUSE]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=14662</guid>

					<description><![CDATA[<p>One of the great advantages of using open source software is that its code is customizable by anyone. This brings the great advantage that there are many eyes seeing the caught in search of perfecting it. And that&#8217;s what happened because thanks to Joe Vennix has discovered a vulnerability in sudo. In this post, we [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/discovered-vulnerability-sudo/">Discovered vulnerability in sudo. Upgrade your system now!</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>One of the great advantages of using open source software is that its code is customizable by anyone. This brings the great advantage that there are many eyes seeing the caught in search of perfecting it. And that&#8217;s what happened because thanks to Joe Vennix has discovered a vulnerability in sudo. In this post, we will explain about it and also tell you how to correct it.</p>



<p>Quickly and by way of introduction, I will tell you that sudo is a tool that allows you to execute commands as if you were another user. Usually the other user is the root user. That is to say with our regular user, we can execute commands as if we were root user. </p>



<p>This situation brings many advantages when facilitating usability in a home system, but is not widely used in business.</p>



<p>The detail is that a vulnerability has been discovered that grants permissions of root user to whom it should not.</p>



<p>Specifically we refer to a vulnerability identified with the number <a rel="noreferrer noopener" aria-label="CVE-2019-14287 (opens in a new tab)" href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-14287" target="_blank">CVE-2019-14287</a> and has already been documented by Canonical under the number <a rel="noreferrer noopener" aria-label="USN-4154-1 (opens in a new tab)" href="https://usn.ubuntu.com/4154-1/" target="_blank">USN-4154-1</a>.</p>



<h2>In which Ubuntu versions is there a vulnerability in sudo?</h2>



<p>For now, the vulnerability in sudo affects the following versions of Ubuntu:</p>



<ul><li>Ubuntu 19.04</li><li><a rel="noreferrer noopener" aria-label="Ubuntu 18.04 LTS (opens in a new tab)" href="https://www.osradar.com/tag/bionic/" target="_blank">Ubuntu 18.04 LTS</a></li><li>Also, Ubuntu 16.04 LTS</li><li>Ubuntu 14.04 ESM</li><li>Ubuntu 12.04 ESM</li></ul>



<p>This at server level as well as desktop operating system level. Therefore, as Ubuntu is one of the most popular distributions, it is easy to deduce that many people are affected by the vulnerability.</p>



<p>On the other hand, also versions 17.x, 18.x and 19.x of <a rel="noreferrer noopener" aria-label="Linux Mint (opens in a new tab)" href="https://www.osradar.com/tag/linux-mint/" target="_blank">Linux Mint</a> has been affected. This is because Linux Mint uses Ubuntu&#8217;s base packages for the system.</p>



<h2>What was the problem?</h2>



<p>The <code>/etc/sudoers</code> file is where you find the configuration of which users may or may not use the sudo command.</p>



<p>However, the security breach discovered<strong> allowed any user to use commands as root</strong>. This was accomplished by modifying the file to circumvent the ban. That is, even when it was defined that a user could not execute sudo, modifying the sudoers file and setting user ID -1, this policy is circumvented.</p>



<p>On the other hand, it is worth mentioning that sudo is not enabled on many servers and there the consequences are less serious.</p>



<h2>How can I solve the problem?</h2>



<p>Fortunately, the vulnerability has been discovered and patched. Therefore, at this point it should already be available as an update through your preferred package manager.</p>



<p>For example, in the case of Ubuntu and Linux Mint is already available.</p>



<figure class="wp-block-image"><img loading="lazy" width="796" height="598" src="https://www.osradar.com/wp-content/uploads/2019/10/sudo.png" alt="Upgrade your system to resolve the vulnerability in sudo" class="wp-image-14669" srcset="https://www.osradar.com/wp-content/uploads/2019/10/sudo.png 796w, https://www.osradar.com/wp-content/uploads/2019/10/sudo-300x225.png 300w, https://www.osradar.com/wp-content/uploads/2019/10/sudo-768x577.png 768w, https://www.osradar.com/wp-content/uploads/2019/10/sudo-80x60.png 80w, https://www.osradar.com/wp-content/uploads/2019/10/sudo-265x198.png 265w, https://www.osradar.com/wp-content/uploads/2019/10/sudo-696x523.png 696w, https://www.osradar.com/wp-content/uploads/2019/10/sudo-559x420.png 559w" sizes="(max-width: 796px) 100vw, 796px" /><figcaption>Upgrade your system to resolve the vulnerability in sudo</figcaption></figure>



<p>And so on the rest of the Linux distributions. Just upgrade. In case you do not have the new update, wait a little longer and it will surely be available.</p>



<p>Sudo has been compromised but there is already a solution. Upgrade now!</p>



<p>Also, you can learn<a rel="noreferrer noopener" aria-label=" how to enable on Debian (opens in a new tab)" href="https://www.osradar.com/how-to-enable-sudo-on-centos-8/" target="_blank"> how to enable on Debian</a> and <a href="https://www.osradar.com/how-to-enable-sudo-on-centos-8/" target="_blank" rel="noreferrer noopener" aria-label="CentOS (opens in a new tab)">CentOS</a>.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/discovered-vulnerability-sudo/">Discovered vulnerability in sudo. Upgrade your system now!</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/discovered-vulnerability-sudo/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>How to enable sudo on CentOS 8?</title>
		<link>https://www.osradar.com/how-to-enable-sudo-on-centos-8/</link>
					<comments>https://www.osradar.com/how-to-enable-sudo-on-centos-8/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Wed, 25 Sep 2019 23:30:34 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Centos 8]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[sudo]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=13828</guid>

					<description><![CDATA[<p>In our CentOS 8 system, it is necessary to execute commands with user privileges. To do this we have a tool from the GNU project called sudo. However, it is necessary that the user of the system has the privilege to use it. So, in this post, you will learn how to enable sudo in [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-enable-sudo-on-centos-8/">How to enable sudo on CentOS 8?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In our CentOS 8 system, it is necessary to execute commands with user privileges. To do this we have a tool from the GNU project called sudo. However, it is necessary that the user of the system has the privilege to use it. So, in this post, you will learn how to enable sudo in CentOS 8. This same tutorial is applicable to Oracle Linux 8 and RHEL 8.</p>


<h2>Briefly, What is sudo?</h2>



<p><a href="https://www.sudo.ws/" target="_blank" rel="noreferrer noopener" aria-label="Sudo (opens in a new tab)">Sudo</a> is a small program or utility that is installed on Linux in order to allow commands to be executed with another user&#8217;s security privileges. Usually, this other user is the root user. This causes the regular user to temporarily become a super user.</p>



<p>For the same reason, there are sysadmin who do not like to use <g class="gr_ gr_4 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" id="4" data-gr-id="4">sudo</g>, because if it is misused it can lead to a security breach. However, in the end, it is up to the users.</p>



<p>So, let us enable it.</p>



<h2>Enabling <g class="gr_ gr_7 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" id="7" data-gr-id="7">sudo</g> on CentOS 8</h2>



<p>If during the installation of CentOS 8 you have decided not to create any user, then the first step is to create it.</p>



<p>Open a terminal or SSH session and execute the following command:</p>



<pre class="wp-block-preformatted">:~$ su<br>:~# adduser [username]</pre>



<p>Remember to replace [username] with the username of your choice. Then, a password must be assigned.</p>



<pre class="wp-block-preformatted">:~# passwd [username]</pre>



<p>Now that we have our user created we can continue. On the other hand, if you have already created the user, you can omit this part.</p>



<p>For the new user to have the sudo command available, it must first be installed. It is usually installed by default but better to be sure.</p>



<pre class="wp-block-preformatted">:~# dnf install sudo</pre>



<p>There are now two ways for the new user to use sudo. The first way is to add this user to the wheel group. All members of the wheel group are authorized to use sudo.</p>



<p>If you decide this way, in the terminal use the following command:</p>



<pre class="wp-block-preformatted">:~# usermod -aG wheel [username]</pre>



<p>Remember to replace [username] with the username you have chosen.</p>



<p>However, if you do not want your user to belong to the wheel group for any reason, then we will have another option. We can add the user to arcihvo sudoers and specify that they are authorized to use sudo.</p>



<p>To do this as root user open the file <code>/etc/sudoers</code></p>



<pre class="wp-block-preformatted">:~# nano /etc/sudoers</pre>



<p>Then, find this section:</p>



<pre class="wp-block-preformatted">Allow root to run any commands anywhere
root ALL=(ALL) ALL</pre>



<p>And add the following:</p>



<pre class="wp-block-preformatted">[username] ALL=(ALL) ALL</pre>



<figure class="wp-block-image"><img loading="lazy" width="649" height="227" src="https://www.osradar.com/wp-content/uploads/2019/09/1-24.png" alt="1.- Enabling sudo on Centos 8" class="wp-image-13910" srcset="https://www.osradar.com/wp-content/uploads/2019/09/1-24.png 649w, https://www.osradar.com/wp-content/uploads/2019/09/1-24-300x105.png 300w" sizes="(max-width: 649px) 100vw, 649px" /><figcaption>1.- Enabling sudo on Centos 8</figcaption></figure>



<p>Remember to change [username] to the new user&#8217;s username. Save the changes and close the file.</p>



<p>And that is it.</p>



<h2>Conclusion</h2>



<p>Sudo is a basic utility to run as super users without being one. This is a great advantage in desktop systems or even in certain circumstances on servers. Simply put, it is one of those things that is always good to have on hand.</p>



<p>On the other hand, if you want to learn how to enable sudo in Debian 10, you can do it with this post:</p>



<p><a href="https://www.osradar.com/how-to-enable-sudo-on-debian-10/" target="_blank" rel="noreferrer noopener" aria-label="How to enable sudo on Debian 10 Buster? (opens in a new tab)">How to enable sudo on Debian 10 Buster?</a></p>



<p>Please share this post and join <a href="https://t.me/osradar" target="_blank" rel="noreferrer noopener" aria-label="our Telegram channel (opens in a new tab)">our Telegram channel</a>.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-enable-sudo-on-centos-8/">How to enable sudo on CentOS 8?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-enable-sudo-on-centos-8/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to enable sudo on Debian 11/ 10?</title>
		<link>https://www.osradar.com/how-to-enable-sudo-on-debian-10/</link>
					<comments>https://www.osradar.com/how-to-enable-sudo-on-debian-10/#comments</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Thu, 11 Jul 2019 01:11:04 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Buster]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=12620</guid>

					<description><![CDATA[<p>Debian 11 has come out of the oven. It is great news for all users of this great Linux distribution. However, it is also great for all of us who use Linux. If like me, you have just installed it, you will notice that your regular user cannot use sudo. And if you come from [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-enable-sudo-on-debian-10/">How to enable sudo on Debian 11/ 10?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Debian 11 has come out of the oven. It is great news for all users of this great Linux distribution. However, it is also great for all of us who use Linux. If like me, you have <a href="https://www.osradar.com/how-to-install-debian-10-buster/" rel="noopener">just installed</a> it, you will notice that your regular user cannot use <code>sudo</code>. And if you come from using Ubuntu or Linux Mint, then surely you miss it. So this post will show you how to enable sudo on Debian 11 /10.</p>
<h2>Introduction &#8211; What is sudo?</h2>
<div class="text-wrap tlid-copy-target">
<div class="result-shield-container tlid-copy-target" tabindex="0">
<p><span class="tlid-translation translation" lang="en"><span class="" title="">In a PC that runs some Linux distribution, there are different users.</span> <span class="" title="">Each of them has defined roles and permits.</span> <span class="" title="">For example, to install a package in Debian it is necessary to do it with root user privileges.</span> <span class="" title="">Then, not all users can do all things.</span></span></p>
<p><span title="">The <a href="https://www.sudo.ws/" rel="noopener">sudo</a> program is part of the GNU suite.</span> <span title="">It is a small application that allows the execution of commands with the security privileges of another user.</span> <span title="">Normally, this &#8220;other&#8221; user is root.</span></p>
<p><span title="">By Debian security policy, this program is not enabled for your regular user.</span> <span class="" title="">And the truth is that if you use Debian on your personal computer we can enable it and it would not be a problem.</span> <span title="">However, if you install Debian to be used on a server, you should not do it.</span></p>
<p><span title="">In any case, sudo allows you to execute commands that your user can not.</span> <span title="">In addition, the commands that are applied with sudo are not registered in the system log.</span></p>
</div>
</div>
<div class="tlid-result-transliteration-container result-transliteration-container transliteration-container">
<h2 class="tlid-transliteration-content transliteration-content full">Enable sudo on Debian 11 / 10</h2>
<p>Depending on how you installed Debian 11 / 10, sudo may not have been installed by default. This is normal, actually. So first you have to install it and for that, you need to have access to the root user of the system. This is vital.</p>
<p>So, open a terminal or connect to your server using SSH.</p>
<pre>:~$ su</pre>
<p>Then, you will have to enter the root user key. If you did the installation, there should be no problem.</p>
<p>After that, you can install sudo from the Debian repositories.</p>
</div>
<pre>:~# apt install sudo</pre>
<p>Sudo is quite light so the installation is quite fast.</p>
<p>Now you have to modify the file <code>/etc/sudoers</code> which is where all the sudo configuration is located. You can use the <code>nano</code> editor for this.</p>
<pre>:~# nano /etc/sudoers</pre>
<p>The file does not have too many lines. In the user privilege specification section, you will find a line like this.</p>
<pre>root ALL=(ALL:ALL) ALL</pre>
<p><span class="tlid-translation translation" lang="en"><span class="" title="">Under it, add your user and leave the rest the same.</span> <span class="" title="">Something like that.</span></span></p>
<pre>your-user ALL=(ALL:ALL) ALL</pre>
<p><figure id="attachment_12663" aria-describedby="caption-attachment-12663" style="width: 532px" class="wp-caption alignnone"><img loading="lazy" class="wp-image-12663 size-full" src="https://www.osradar.com/wp-content/uploads/2019/07/1-8.png" alt="1.- Enable sudo on Debian 11 / 10" width="532" height="217" srcset="https://www.osradar.com/wp-content/uploads/2019/07/1-8.png 532w, https://www.osradar.com/wp-content/uploads/2019/07/1-8-300x122.png 300w" sizes="(max-width: 532px) 100vw, 532px" /><figcaption id="caption-attachment-12663" class="wp-caption-text">1.- Enable sudo on Debian 11 / 10</figcaption></figure></p>
<p>Next, press CTRL + O to save the changes and CTRL +X to close it.</p>
<p>After that, you can use sudo.</p>
<p>So, share this post with your friends and join <a href="http://t.me/osradar">our Telegram Channel</a>.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-enable-sudo-on-debian-10/">How to enable sudo on Debian 11/ 10?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-enable-sudo-on-debian-10/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
	</channel>
</rss>
