<?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: Linux Tips: Password usage in sudo (PASSWD / NOPASSWD)</title> <atom:link href="http://www.ducea.com/2006/06/18/linux-tips-password-usage-in-sudo-passwd-nopasswd/feed/" rel="self" type="application/rss+xml" /><link>http://www.ducea.com/2006/06/18/linux-tips-password-usage-in-sudo-passwd-nopasswd/</link> <description>The Journal Of A Linux Sysadmin</description> <lastBuildDate>Wed, 08 Feb 2012 13:08:17 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3</generator> <item><title>By: Lenin</title><link>http://www.ducea.com/2006/06/18/linux-tips-password-usage-in-sudo-passwd-nopasswd/comment-page-2/#comment-193902</link> <dc:creator>Lenin</dc:creator> <pubDate>Sat, 04 Feb 2012 20:18:23 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/06/18/linux-tips-password-usage-in-sudo-passwd-nopasswd/#comment-193902</guid> <description>Marius, I am trying to give the passwd from Stdin, as like below:echo passwd &#124; sudo -S ./Documents/Burnintest.shor
sudo -S ./Documents/Burnintest.sh &lt; test.txt
passwd is stored in the test.txt
Both the commnads doesnt work, pls throw some light on this</description> <content:encoded><![CDATA[<p>Marius, I am trying to give the passwd from Stdin, as like below:</p><p>echo passwd | sudo -S ./Documents/Burnintest.sh</p><p>or<br
/> sudo -S ./Documents/Burnintest.sh &lt; test.txt<br
/> passwd is stored in the test.txt<br
/> Both the commnads doesnt work, pls throw some light on this</p> ]]></content:encoded> </item> <item><title>By: Manohar</title><link>http://www.ducea.com/2006/06/18/linux-tips-password-usage-in-sudo-passwd-nopasswd/comment-page-2/#comment-193297</link> <dc:creator>Manohar</dc:creator> <pubDate>Tue, 16 Aug 2011 10:18:50 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/06/18/linux-tips-password-usage-in-sudo-passwd-nopasswd/#comment-193297</guid> <description>Hello Marius..It is working...Thank you so much....!!!</description> <content:encoded><![CDATA[<p>Hello Marius..</p><p>It is working&#8230;</p><p>Thank you so much&#8230;.!!!</p> ]]></content:encoded> </item> <item><title>By: - Marius -</title><link>http://www.ducea.com/2006/06/18/linux-tips-password-usage-in-sudo-passwd-nopasswd/comment-page-2/#comment-193290</link> <dc:creator>- Marius -</dc:creator> <pubDate>Fri, 12 Aug 2011 14:35:43 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/06/18/linux-tips-password-usage-in-sudo-passwd-nopasswd/#comment-193290</guid> <description>@Manohar you should have something like this in your sudoers:
manohar ALL = NOPASSWD: ALL
instead of:
manohar ALL=(ALL) ALL</description> <content:encoded><![CDATA[<p>@Manohar you should have something like this in your sudoers:<br
/> manohar ALL = NOPASSWD: ALL<br
/> instead of:<br
/> manohar ALL=(ALL) ALL</p> ]]></content:encoded> </item> <item><title>By: Manohar</title><link>http://www.ducea.com/2006/06/18/linux-tips-password-usage-in-sudo-passwd-nopasswd/comment-page-2/#comment-193289</link> <dc:creator>Manohar</dc:creator> <pubDate>Fri, 12 Aug 2011 14:13:57 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/06/18/linux-tips-password-usage-in-sudo-passwd-nopasswd/#comment-193289</guid> <description># Defaults specification#
# Disable &quot;ssh hostname sudo &quot;, because it will show the password in clear.
#         You have to run &quot;ssh -t hostname sudo &quot;.
#
Defaults    requirettyDefaults    env_reset
Defaults    env_keep =  &quot;COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR LS_COLORS&quot;
Defaults    env_keep += &quot;MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE&quot;
Defaults    env_keep += &quot;LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES&quot;
Defaults    env_keep += &quot;LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE&quot;
Defaults    env_keep += &quot;LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY&quot;## Next comes the main part: which users can run what software on
## which machines (the sudoers file can be shared between multiple
## systems).
## Syntax:
##
##      user    MACHINE=COMMANDS
##
## The COMMANDS section may have other options added to it.
##
## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
manohar ALL=(ALL)       ALL## Allows members of the &#039;sys&#039; group to run networking, software,
## service management apps and more.
# %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS## Allows people in group wheel to run all commands
# %wheel        ALL=(ALL)       ALL## Same thing without a password
# %wheel        ALL=(ALL)       NOPASSWD: ALL## Allows members of the users group to mount and unmount the
## cdrom as root
# %users  ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom## Allows members of the users group to shutdown this system
# %users  localhost=/sbin/shutdown -h now-- INSERT --This is my sudoers file...</description> <content:encoded><![CDATA[<p># Defaults specification</p><p>#<br
/> # Disable &#8220;ssh hostname sudo &#8220;, because it will show the password in clear.<br
/> #         You have to run &#8220;ssh -t hostname sudo &#8220;.<br
/> #<br
/> Defaults    requiretty</p><p>Defaults    env_reset<br
/> Defaults    env_keep =  &#8220;COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR LS_COLORS&#8221;<br
/> Defaults    env_keep += &#8220;MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE&#8221;<br
/> Defaults    env_keep += &#8220;LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES&#8221;<br
/> Defaults    env_keep += &#8220;LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE&#8221;<br
/> Defaults    env_keep += &#8220;LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY&#8221;</p><p>## Next comes the main part: which users can run what software on<br
/> ## which machines (the sudoers file can be shared between multiple<br
/> ## systems).<br
/> ## Syntax:<br
/> ##<br
/> ##      user    MACHINE=COMMANDS<br
/> ##<br
/> ## The COMMANDS section may have other options added to it.<br
/> ##<br
/> ## Allow root to run any commands anywhere<br
/> root    ALL=(ALL)       ALL<br
/> manohar ALL=(ALL)       ALL</p><p>## Allows members of the &#8216;sys&#8217; group to run networking, software,<br
/> ## service management apps and more.<br
/> # %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS</p><p>## Allows people in group wheel to run all commands<br
/> # %wheel        ALL=(ALL)       ALL</p><p>## Same thing without a password<br
/> # %wheel        ALL=(ALL)       NOPASSWD: ALL</p><p>## Allows members of the users group to mount and unmount the<br
/> ## cdrom as root<br
/> # %users  ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom</p><p>## Allows members of the users group to shutdown this system<br
/> # %users  localhost=/sbin/shutdown -h now</p><p>&#8211; INSERT &#8211;</p><p>This is my sudoers file&#8230;</p> ]]></content:encoded> </item> <item><title>By: Manohar</title><link>http://www.ducea.com/2006/06/18/linux-tips-password-usage-in-sudo-passwd-nopasswd/comment-page-2/#comment-193288</link> <dc:creator>Manohar</dc:creator> <pubDate>Fri, 12 Aug 2011 14:10:34 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/06/18/linux-tips-password-usage-in-sudo-passwd-nopasswd/#comment-193288</guid> <description>Hi to All,
How to use sudo without entering password,...i saw all posts but in my sudoers file, i dnt have  this &quot; # Allow members of group sudo to execute any command&quot;
Please any help me.</description> <content:encoded><![CDATA[<p>Hi to All,</p><p> How to use sudo without entering password,&#8230;i saw all posts but in my sudoers file, i dnt have  this &#8221; # Allow members of group sudo to execute any command&#8221;<br
/> Please any help me.</p> ]]></content:encoded> </item> <item><title>By: - Marius -</title><link>http://www.ducea.com/2006/06/18/linux-tips-password-usage-in-sudo-passwd-nopasswd/comment-page-2/#comment-192898</link> <dc:creator>- Marius -</dc:creator> <pubDate>Fri, 13 May 2011 18:50:44 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/06/18/linux-tips-password-usage-in-sudo-passwd-nopasswd/#comment-192898</guid> <description>@John: you are welcome, happy I was able to help.</description> <content:encoded><![CDATA[<p>@John: you are welcome, happy I was able to help.</p> ]]></content:encoded> </item> <item><title>By: John</title><link>http://www.ducea.com/2006/06/18/linux-tips-password-usage-in-sudo-passwd-nopasswd/comment-page-2/#comment-192897</link> <dc:creator>John</dc:creator> <pubDate>Fri, 13 May 2011 18:39:41 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/06/18/linux-tips-password-usage-in-sudo-passwd-nopasswd/#comment-192897</guid> <description>Hello MariusIt worked perfectly!!! uff...Thank you for your incredible help and patience.</description> <content:encoded><![CDATA[<p>Hello Marius</p><p>It worked perfectly!!! uff&#8230;</p><p>Thank you for your incredible help and patience.</p> ]]></content:encoded> </item> <item><title>By: - Marius -</title><link>http://www.ducea.com/2006/06/18/linux-tips-password-usage-in-sudo-passwd-nopasswd/comment-page-2/#comment-192896</link> <dc:creator>- Marius -</dc:creator> <pubDate>Fri, 13 May 2011 17:17:57 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/06/18/linux-tips-password-usage-in-sudo-passwd-nopasswd/#comment-192896</guid> <description>@John: ok, you need to add in your sudoers file the exact command you run with sudo (in your above example: BurnInProg). I would suggest to add it with full path and include it exactly the same in your script. This should fix your problem.</description> <content:encoded><![CDATA[<p>@John: ok, you need to add in your sudoers file the exact command you run with sudo (in your above example: BurnInProg). I would suggest to add it with full path and include it exactly the same in your script. This should fix your problem.</p> ]]></content:encoded> </item> <item><title>By: John</title><link>http://www.ducea.com/2006/06/18/linux-tips-password-usage-in-sudo-passwd-nopasswd/comment-page-2/#comment-192895</link> <dc:creator>John</dc:creator> <pubDate>Fri, 13 May 2011 16:19:44 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/06/18/linux-tips-password-usage-in-sudo-passwd-nopasswd/#comment-192895</guid> <description>Hello Marius.My script is something like:
#!/bin/bash#bla bla bla (this is a section where i put some normal commands like &#039;grep&#039; and stuff to determine if the PC is capable of running the BurnInTest program)var1=&quot;BurnInProg&quot;
sudo $var1
exit 0OK. That&#039;s my script.
If I go into a terminal and type in:
sudo ./Documents/Burnintest.sh
Everything works OK and no password is required.But if I go into a terminal and type in:
./Documents/Burnintest.sh
the terminal still asks me for a password, although as you can see in my script the sudo command is already there.
And that&#039;s the part I don&#039;t understand.
Because I&#039;m basically using 2 sudo commands for the script to work with no password!</description> <content:encoded><![CDATA[<p>Hello Marius.</p><p>My script is something like:<br
/> #!/bin/bash</p><p>#bla bla bla (this is a section where i put some normal commands like &#8216;grep&#8217; and stuff to determine if the PC is capable of running the BurnInTest program)</p><p>var1=&#8221;BurnInProg&#8221;<br
/> sudo $var1<br
/> exit 0</p><p>OK. That&#8217;s my script.<br
/> If I go into a terminal and type in:<br
/> sudo ./Documents/Burnintest.sh<br
/> Everything works OK and no password is required.</p><p>But if I go into a terminal and type in:<br
/> ./Documents/Burnintest.sh<br
/> the terminal still asks me for a password, although as you can see in my script the sudo command is already there.<br
/> And that&#8217;s the part I don&#8217;t understand.<br
/> Because I&#8217;m basically using 2 sudo commands for the script to work with no password!</p> ]]></content:encoded> </item> <item><title>By: - Marius -</title><link>http://www.ducea.com/2006/06/18/linux-tips-password-usage-in-sudo-passwd-nopasswd/comment-page-2/#comment-192892</link> <dc:creator>- Marius -</dc:creator> <pubDate>Fri, 13 May 2011 04:52:13 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/06/18/linux-tips-password-usage-in-sudo-passwd-nopasswd/#comment-192892</guid> <description>@John: I don&#039;t understand. This is how you run all the sudo commands, by adding the sudo prefix. This is how sudo works. Now the only way you can achieve that is run sudo inside your script on the particular step it needs super user rights. hth.</description> <content:encoded><![CDATA[<p>@John: I don&#8217;t understand. This is how you run all the sudo commands, by adding the sudo prefix. This is how sudo works. Now the only way you can achieve that is run sudo inside your script on the particular step it needs super user rights. hth.</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Served from: www.ducea.com @ 2012-02-08 19:35:02 by W3 Total Cache -->
