 |
 |
How to allow non-admins to boot from OS 9?
|
 |
|
 |
|
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status:
Offline
|
|
I have a client group that uses Mac OS X during the week, and on Sundays needs to boot into OS 9 (not just Classic). However, there is not always an admin user available to change the startup disk so that they (usually non-admin users) can boot from OS 9.
Is there any way I can get the non-admin users to boot into OS 9 without requiring admin access?
The only ways I can think of are not at all satisfactory:
1. Re-partition the HD so that OS 9 is on a separate partition, then boot holding down option key (not an option - the HD is nearly full and I don't want to split the little remaining space over two partitions).
2. Insert a Mac OS 9 bootable CD-ROM and change the startup disk from the control panel there. Obviously a very inelegant solution, requiring two boots, and an easy-to-lose CD-ROM.
I know that you can force a boot into OS X by holding down the "X" key at startup. Is there anything similar for OS 9 booting?
Any other ideas?
(BTW: I know that Mac OS 9 gives them effective admin access to files, but malicious use is not the issue here, the security here is to avoid accidental problems).
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2001
Location: Minneapolis, MN
Status:
Offline
|
|
Maybe create an admin user who has no file permissions but is allowed to change settings. Since you're not concerned with malicious use, they would probably be trusted enough to type in this pruned-back administrator name/pass when they click the lock in Startup Disk.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Dec 2001
Location: UK
Status:
Offline
|
|
All I can think of is to get yourself (your client) an external drive with OS 9 installed and boot from that using the option key at startup.
What exactly do they have to do in 9? It is of course possible to just copy the 9 system folder to a CD and boot from that which might be an answer if they only need to do something simple.
|
|
If it rained soup I'd have a fork in my hand!
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status:
Offline
|
|
Do this:
1. Make a new Applescript in the Script Editor. Set the contents to this:
Code:
do shell script "/usr/sbin/bless -folder9 '/System Folder' -setOF"
restart
2. Save the Applescript as an application, somewhere handy like the Applications folder. Give it a good name like "Reboot into OS 9".
You might want to paste on some nice icon, like the 'Classic Startup' icon from /System/Library/CoreServices/Classic Startup.app
3. Now, you'll make this script run as root:
a. Open the Terminal (in an admin account).
b. Type sudo chown root
and leave one space after the 'root'.
c. Drag and drop the Applescript onto the Terminal window, and press return.
You'll be prompted for your admin password.
d. Type sudo chmod a+s
again, leaving a space after the 'a+s'.
e. Again, drag and drop the Applescript onto the Terminal window, and press return.
It will remember your authorization from before.
This makes the application run as root, so it will automatically have the privileges to change the startup disk..
NOTE: I have not tried this. But it seems plausible to me that it should work.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status:
Offline
|
|
|
(Last edited by Mithras; Mar 5, 2003 at 11:01 AM.
)
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status:
Offline
|
|
Originally posted by Mithras:
Do this:
1. Make a new Applescript in the Script Editor. Set the contents to this:
Code:
do shell script "/usr/sbin/bless -folder9 '/System Folder' -setOF"
restart
2. Save the Applescript as an application, somewhere handy like the Applications folder. Give it a good name like "Reboot into OS 9".
You might want to paste on some nice icon, like the 'Classic Startup' icon from /System/Library/CoreServices/Classic Startup.app
3. Now, you'll make this script run as root:
a. Open the Terminal (in an admin account).
b. Type sudo chown root
and leave one space after the 'root'.
c. Drag and drop the Applescript onto the Terminal window, and press return.
You'll be prompted for your admin password.
d. Type sudo chmod a+s
again, leaving a space after the 'a+s'.
e. Again, drag and drop the Applescript onto the Terminal window, and press return.
It will remember your authorization from before.
This makes the application run as root, so it will automatically have the privileges to change the startup disk..
NOTE: I have not tried this. But it seems plausible to me that it should work.
This looks like an excellent idea, I was unaware of the -setOF option to the bless command! I just looked it up in the man pages, and that looks like it should do the trick.
I'll give it a go.
I do remember that last time I tried to set the setUID bit, OS X wouldn't let me , I'll give it a go now...
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status:
Offline
|
|
Originally posted by Brass:
This looks like an excellent idea, I was unaware of the -setOF option to the bless command! I just looked it up in the man pages, and that looks like it should do the trick.
I'll give it a go.
I do remember that last time I tried to set the setUID bit, OS X wouldn't let me , I'll give it a go now...
No, that doesn't work. The reason being, that Apple Scripts will not run unless they are run as the user that owns the current display.
However, I think if I write the shell script seperately that should do the trick.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status:
Offline
|
|
Well, I eventually got it working by using TWO shell scripts, one of which calls the other. I could equally well have done it with one Apple Script and one shell script.
They need to be two seperate scripts because the one that sets open firmware to the new boot volume MUST be run as root (or at lease as an admin user?).
The one that runs the restart Apple Script command MUST be run as the user who owns the current display (ie, potentially a non-admin user).
I'd still like to find a neater solution, but this is a good start.
Is there any way to neatly script a system restart in the shell ("reboot" gives the user no warning, and kills any running apps, potentially loosing data)?
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status:
Offline
|
|
osascript -e 'tell application "Finder" to restart' seems to work from a shell script as root.
Stick that in a shell script that's suid to root, and add just a simple Applescript to call that script, and I think you're done.
By the way, I was in Tasmania in January, and I loved it. Gorgeous hiking, very cute furry mammals, and the people were friendly and "real", in an American West kind of way.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status:
Offline
|
|
Originally posted by Mithras:
osascript -e 'tell application "Finder" to restart' seems to work from a shell script as root.
Stick that in a shell script that's suid to root, and add just a simple Applescript to call that script, and I think you're done.
By the way, I was in Tasmania in January, and I loved it. Gorgeous hiking, very cute furry mammals, and the people were friendly and "real", in an American West kind of way.
Yep that works. I'm now trying to work on a Cocoa/ObjectiveC implementation. The Authorisation Services part is where I'm having the problem now. It's a bit confusing. (The application has to get admin authorisation to setUID root the first time it is launched after installatin).
Yes, Tassie is a great place. I had three bush walks planned for this month, but I've just torn two ligaments in my ankle, so I won't be doing any of them until anothe 9 months or so  .
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|