[ale] Sudo

James P. Kinney III jkinney at localnetsolutions.com
Wed May 18 21:38:57 EDT 2005


On Wed, 2005-05-18 at 17:21 -0400, Jim Popovitch wrote:
> Several times in the (still going)
> setuid/viral/malware/root/non-root/etc discussion people have mentioned
> using sudo.  One of the things I've always disliked about sudo is the
> need for me to have to preface some commands I want to run as su vs
> which I don't.  What I mean is as a user if I want to run "ifconfig eth
> mtu 1149", I need to acually run "sudo ifconfig eth0 mtu 1149", but if I
> want to just see what the MTU is for interface eth0 I don't need sudo.
> What I think would be neat is for bash (or other shells) to remember
> sudo commands that users run and to automatically invoke sudo the next
> time I run the command without it.  Knowing when to use sudo is not the
> issue here, having sudo know when it is needed is.  

alias is your friend. alias set_mtu="sudo /sbin/ifconfig eth0 mtu 1149"
> 
> A couple of questions:
> 
> 1) Why would this be good/bad?
> 
> 2) Is this something bash completion could accomplish?
> 
> 3) Is there any other similar scenario?
> 
> -Jim P.
> 
> 
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
-- 
James P. Kinney III          \Changing the mobile computing world/
CEO & Director of Engineering \          one Linux user         /
Local Net Solutions,LLC        \           at a time.          /
770-493-8244                    \.___________________________./
http://www.localnetsolutions.com

GPG ID: 829C6CA7 James P. Kinney III (M.S. Physics)
<jkinney at localnetsolutions.com>
Fingerprint = 3C9E 6366 54FC A3FE BA4D 0659 6190 ADC3 829C 6CA7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part




More information about the Ale mailing list