Re: using bless to change boot device [yet again]
Re: using bless to change boot device [yet again]
- Subject: Re: using bless to change boot device [yet again]
- From: Herbert <email@hidden>
- Date: Sat, 20 Aug 2005 21:38:18 -0700
Genius. Works great! Thanks!
On Aug 20, 2005, at 1:26 PM, Milton Sagen wrote:
try this
echo myPassword | sudo -S dosomething
you still get the password prompt along with the message
Vim: Warning: Input is not from a terminal
but it then does what you request.
Milt
On Aug 20, 2005, at 11:58, Herbert wrote:
I am making a little utility to change the boot volume from a
menu. I do this a lot for testing.
I am using bless to change the boot volume.
If I'm logged in as root then it's fine, but if I'm not, I have to
use sudo.
I have been unable to figure out how to do this.
I am trying to use either system (sudo bless etc) or popen and
fread to do this.
sudo wants the password on another line, not on the same line, and
there seems to be no way to get it on the same line.
Once system or fread is called, I have been unable to figure out
how to feed it the password.
So I'm stuck. Is there another way? Can sudo be convinced to
change it's ways?
The OS can do this via the System Preferences control panel, so
how are they doing it?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden