DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 12th May 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Default [Solved] question about echo with sudo

Hi !
$ sudo echo "USE_SYSTRACE=Yes" > /etc/mk.conf
doesn't work.
# echo "USE_SYSTRACE=Yes" > /etc/mk.conf
works.

Why does 'echo' disregard sudoing ?
Reply With Quote
  #2   (View Single Post)  
Old 12th May 2012
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by daemonfowl View Post
Why does 'echo' disregard sudoing ?
echo(1) is not the problem.

The redirection is being done by the shell, not echo(1) or sudo(8). Normal users don't have permission to write into /etc while root does.
Reply With Quote
  #3   (View Single Post)  
Old 12th May 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Default

I see , thanks Ocicat !
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
echo and print ? sharris FreeBSD General 1 4th September 2011 06:25 AM
Do you su or sudo? ocicat General software and network 18 22nd July 2011 06:03 PM
Shell script: echo something to stderr Carpetsmoker Programming 4 28th June 2010 09:04 PM
sudo issue rpindy OpenBSD General 6 31st May 2010 04:12 PM
echo tcpdump date to an output bsdnewbie999 Programming 8 8th April 2009 02:58 PM


All times are GMT. The time now is 11:28 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick