<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>
	Comments on: 10 Useful Sudoers Configurations for Setting &#8216;sudo&#8217; in Linux	</title>
	<atom:link href="https://www.tecmint.com/sudoers-configurations-for-setting-sudo-in-linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.tecmint.com/sudoers-configurations-for-setting-sudo-in-linux/</link>
	<description>Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks.</description>
	<lastBuildDate>Thu, 13 Jul 2023 12:11:10 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: Ravi Saive		</title>
		<link>https://www.tecmint.com/sudoers-configurations-for-setting-sudo-in-linux/comment-page-1/#comment-1961775</link>

		<dc:creator><![CDATA[Ravi Saive]]></dc:creator>
		<pubDate>Fri, 10 Feb 2023 06:58:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.tecmint.com/?p=24128#comment-1961775</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/sudoers-configurations-for-setting-sudo-in-linux/comment-page-1/#comment-1961556&quot;&gt;Alajjana&lt;/a&gt;.

@Aljjana,

Thanks, corrected the command in the script...]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/sudoers-configurations-for-setting-sudo-in-linux/comment-page-1/#comment-1961556">Alajjana</a>.</p>
<p>@Aljjana,</p>
<p>Thanks, corrected the command in the script&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Alajjana		</title>
		<link>https://www.tecmint.com/sudoers-configurations-for-setting-sudo-in-linux/comment-page-1/#comment-1961556</link>

		<dc:creator><![CDATA[Alajjana]]></dc:creator>
		<pubDate>Thu, 09 Feb 2023 20:07:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.tecmint.com/?p=24128#comment-1961556</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/sudoers-configurations-for-setting-sudo-in-linux/comment-page-1/#comment-1589161&quot;&gt;Ravi Saive&lt;/a&gt;.

This is a minor typo.
&lt;pre&gt;
$(who am i &#124; awk &#039;{print $1}&#039;;exit)
&lt;/pre&gt;
should be:
&lt;pre&gt;
$(whoami &#124; awk &#039;{print $1}&#039;;exit)
&lt;/pre&gt;
Fantastic. Thank you for this script.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/sudoers-configurations-for-setting-sudo-in-linux/comment-page-1/#comment-1589161">Ravi Saive</a>.</p>
<p>This is a minor typo.</p>
<pre>
$(who am i | awk '{print $1}';exit)
</pre>
<p>should be:</p>
<pre>
$(whoami | awk '{print $1}';exit)
</pre>
<p>Fantastic. Thank you for this script.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ravi Saive		</title>
		<link>https://www.tecmint.com/sudoers-configurations-for-setting-sudo-in-linux/comment-page-1/#comment-1589808</link>

		<dc:creator><![CDATA[Ravi Saive]]></dc:creator>
		<pubDate>Thu, 16 Sep 2021 06:01:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.tecmint.com/?p=24128#comment-1589808</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/sudoers-configurations-for-setting-sudo-in-linux/comment-page-1/#comment-1589639&quot;&gt;Ashok B&lt;/a&gt;.

@Ashok,

I think you can add those lines to /etc/profile and see if it is working or not...]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/sudoers-configurations-for-setting-sudo-in-linux/comment-page-1/#comment-1589639">Ashok B</a>.</p>
<p>@Ashok,</p>
<p>I think you can add those lines to /etc/profile and see if it is working or not&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ashok B		</title>
		<link>https://www.tecmint.com/sudoers-configurations-for-setting-sudo-in-linux/comment-page-1/#comment-1589639</link>

		<dc:creator><![CDATA[Ashok B]]></dc:creator>
		<pubDate>Wed, 15 Sep 2021 22:48:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.tecmint.com/?p=24128#comment-1589639</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/sudoers-configurations-for-setting-sudo-in-linux/comment-page-1/#comment-1589161&quot;&gt;Ravi Saive&lt;/a&gt;.

Hi Ravi,

Thank you so much for the quick response. Does the same procedure apply on AIX 7.2 servers since it uses Korn shell by default? I see that the &lt;strong&gt;/etc/profile.d&lt;/strong&gt; directory does not exist on AIX servers and I have implemented step 1 by adding those lines in &lt;strong&gt;/etc/profile&lt;/strong&gt; to set up secondary logging for root which looks good as the file was created, not sure if I should add commands to the same &lt;strong&gt;/etc/profile&lt;/strong&gt; file to setup secondary logging for other users except root. Thank you.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/sudoers-configurations-for-setting-sudo-in-linux/comment-page-1/#comment-1589161">Ravi Saive</a>.</p>
<p>Hi Ravi,</p>
<p>Thank you so much for the quick response. Does the same procedure apply on AIX 7.2 servers since it uses Korn shell by default? I see that the <strong>/etc/profile.d</strong> directory does not exist on AIX servers and I have implemented step 1 by adding those lines in <strong>/etc/profile</strong> to set up secondary logging for root which looks good as the file was created, not sure if I should add commands to the same <strong>/etc/profile</strong> file to setup secondary logging for other users except root. Thank you.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ravi Saive		</title>
		<link>https://www.tecmint.com/sudoers-configurations-for-setting-sudo-in-linux/comment-page-1/#comment-1589161</link>

		<dc:creator><![CDATA[Ravi Saive]]></dc:creator>
		<pubDate>Wed, 15 Sep 2021 05:10:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.tecmint.com/?p=24128#comment-1589161</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/sudoers-configurations-for-setting-sudo-in-linux/comment-page-1/#comment-1588994&quot;&gt;Ashok&lt;/a&gt;.

@Ashok,

First, create a log directory and set the sticky bit on it.
&lt;pre&gt;
# mkdir -p /var/log/users_historylogs/
# chmod +t  /var/log/users_historylogs/ 
&lt;/pre&gt;
Next, create a new script file under &lt;strong&gt;/etc/profile.d/&lt;/strong&gt; directory.
&lt;pre&gt;
# vi /etc/profile.d/history_log.sh
&lt;/pre&gt;
And add the below content at the bottom, save, and exit.
&lt;pre&gt;
_who_am_i=$(whoami&#124;awk &#039;{print $1}&#039;)
_ID=$(id -u $_who_am_i)
 
if [ &quot;$_ID&quot; &gt; 0 ]
then
export HISTSIZE=10000
export HISTTIMEFORMAT=&#039;%F %T &#039;
export HISTFILE=/var/log/users_historylogs/history-users-$(whoami &#124; awk &#039;{print $1}&#039;;exit)-$(date +%F)
export PROMPT_COMMAND=&#039;history -a&#039;
fi
&lt;/pre&gt;
Set the permission and enable the script.
&lt;pre&gt;
# chmod 770 /etc/profile.d/history_log.sh
# source /etc/profile.d/history_log.sh
&lt;/pre&gt;
Now all user executed commands history saved to log file...]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/sudoers-configurations-for-setting-sudo-in-linux/comment-page-1/#comment-1588994">Ashok</a>.</p>
<p>@Ashok,</p>
<p>First, create a log directory and set the sticky bit on it.</p>
<pre>
# mkdir -p /var/log/users_historylogs/
# chmod +t  /var/log/users_historylogs/ 
</pre>
<p>Next, create a new script file under <strong>/etc/profile.d/</strong> directory.</p>
<pre>
# vi /etc/profile.d/history_log.sh
</pre>
<p>And add the below content at the bottom, save, and exit.</p>
<pre>
_who_am_i=$(whoami|awk '{print $1}')
_ID=$(id -u $_who_am_i)
 
if [ "$_ID" > 0 ]
then
export HISTSIZE=10000
export HISTTIMEFORMAT='%F %T '
export HISTFILE=/var/log/users_historylogs/history-users-$(whoami | awk '{print $1}';exit)-$(date +%F)
export PROMPT_COMMAND='history -a'
fi
</pre>
<p>Set the permission and enable the script.</p>
<pre>
# chmod 770 /etc/profile.d/history_log.sh
# source /etc/profile.d/history_log.sh
</pre>
<p>Now all user executed commands history saved to log file&#8230;</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
