[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain -->
- <!--x-date: Thu May 19 14:14:25 2005 -->
- <!--x-from-r13: wnfbaqnl ng jbeyqarg.ngg.arg (Xnfba Rnl) -->
- <!--x-message-id: [email protected] -->
- <!--x-reference: [email protected] --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-subject: [ale] Sudo -->
- <li><em>date</em>: Thu May 19 14:14:25 2005</li>
- <li><em>from</em>: jasonday at worldnet.att.net (Jason Day)</li>
- <li><em>in-reply-to</em>: <[email protected]></li>
- <li><em>references</em>: <[email protected]></li>
- <li><em>subject</em>: [ale] Sudo</li>
Personally, I think this is a bad idea because it removes the extra step
needed to perform a priviliged action. If you've configured sudo so
that you don't need to enter a password, then having the shell
automatically convert "commant" to "sudo command" is dangerous. It's
equivalent to always running as root, which we all know I think is a bad
idea :)
> 2) Is this something bash completion could accomplish?
I don't think so. But it might be possible to write a wrapper script
that takes user input, passes it to bash, then passes the bash output
back to the user. For each user input command, if it starts with
'sudo', store the command in a hashtable. If it doesn't start with
sudo, then see if the command is in the hashtable. If it is, prepend
'sudo ' before passing it to bash. I don't know how well that would
work with pipes though.
--
Jason Day jasonday at
<a rel="nofollow" href="http://jasonday.home.att.net">http://jasonday.home.att.net</a> worldnet dot att dot net
"Of course I'm paranoid, everyone is trying to kill me."
-- Weyoun-6, Star Trek: Deep Space 9
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00671" href="msg00671.html">[ale] Sudo</a></strong>
<ul><li><em>From:</em> jimpop at yahoo.com (Jim Popovitch)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00607" href="msg00607.html">[ale] Sudo</a></strong>
<ul><li><em>From:</em> jimpop at yahoo.com (Jim Popovitch)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00658.html">[ale] Sunday 05-22-05 6PM RUN-AS-ROOT CHALLENGE</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00660.html">[ale] Debian issues from Drew</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00636.html">[ale] Sudo</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00671.html">[ale] Sudo</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00659"><strong>Date</strong></a></li>
<li><a href="threads.html#00659"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>