creating a loopback device

Paul Sladen sounder at paul.sladen.org
Tue Nov 23 00:30:57 UTC 2004


On Mon, 15 Nov 2004 use_real_email at volcano.xlogicgroup.com wrote:
> Code:
> --------------------
>     sudo echo "loop" >> /etc/modules
> --------------------

Unfortunately, in the case above it is the 'echo' part that gets run as root
(with sudo) and not the second 'cat' part of the command that is writing to
the protected file.

echo'ing doesn't need any permissions, so you can do:

    echo loop | sudo tee -a /etc/modules

	-Paul
-- 
Is there no safe way to travel?  Nottingham, GB






More information about the ubuntu-users mailing list