[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



;-) True, but some commands, even though they require root, aren't
dangerous for users to run on a desktop/laptop.  In those cases why
bother forcing them to use sudo... just do it automagically for them and
let sudo prompt them for a passwd according to settings in sudoers.  Let
sudo be the gatekeeper, not the bash command line.

> > 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.

Excellent idea.  A bash wrapper. perhaps I'll call it "subash".  ;-)  

-Jim P.








</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--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>
<li><strong><a name="00659" href="msg00659.html">[ale] Sudo</a></strong>
<ul><li><em>From:</em> jasonday at worldnet.att.net (Jason Day)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00670.html">[ale] Sunday 05-22-05 6PM RUN-AS-ROOT CHALLENGE</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00672.html">REsolved: [ale] NewbieQ: What image file format to burn a data DV D?</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00659.html">[ale] Sudo</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00616.html">[ale] IP Aliasing (please help!)</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00671"><strong>Date</strong></a></li>
<li><a href="threads.html#00671"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>