[sclug] sudo / su
Robin Lewis
goten at squad-wars.com
Wed Jan 10 01:52:31 UTC 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Darren Davison wrote:
> hi SCLUGgers,
>
> I've necessarily become acquainted with sudo since switching from
> gentoo to *ubuntu, but there's something I'm unclear on with it.
>
> If I try to do "sudo echo 1 > /proc/whatever" it fails with
> permission denied errors. It only works if I "sudo su -" and then
> change the value. Could someone kindly explain why?
>
> Many thanks :)
Because of the way sudo and/or bash works with redirection, you're
basically trying to output the result of "sudo echo 1" to
/proc/whatever. I forget the way to get around this, but I'm sure
someone with more knowledge than I will figure it out.
Also, handy hint to get the effect of su using sudo: sudo bash.
Instant root shell.
- --
Robin Lewis
Proud Slackware user
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFpEbUg5OW9OQFrSMRApYtAJ9GZ+/D7d/SDmZe6ftO/W+CKcWQ7gCdFWCZ
sjHqP+W5o4FrvTM65xvoqjU=
=JsSW
-----END PGP SIGNATURE-----
More information about the Sclug
mailing list