Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lockdown Desktop on Mac OS 10.3 1

Status
Not open for further replies.

rak342

Technical User
Jun 30, 2003
45
US
Hello,
I have a computer lab full of Mac's running Panther and I was trying to lockdown them so no one could save documents to the desktop.
I still would like the students to be able save to other locations on HD.
Is there a way to do this? I looked thru System Prefernces- no help there..

Any help would be great.
 
Log on as administrator and open the hard drive. Each user has Desktop listed under their account. Right (Control) click and Get Info. Go to Ownership & permissions at bottom and click on triangle next to details Under each user/Access select Read Only.

Make sure that the administrator account has full access.

See if that works.
 
jmgalvin's got the right idea, but his change won't prevent users from re-enabling the desktop folder and won't prevent them from messing with icon settings and so fort. If you want to *completely* lock down the desktop (i.e., prevent users from changing icon settings and such) you might want to use a terminal script.

I'm assuming you know a bit about using Terminal here. Log in as admin, and use pico or vi to create a file called "lock_desktops". Copy the following lines to the file:

#!/bin/bash

for f in /Users/*/Desktop
do
chmod ugo-w $f
chmod ugo-w $f/.DS_Store
chown root $f
chown root $f/.DS_Store
done

Save the file then type

chmod +x ./lock_desktops
sudo ./lock_desktops

type in your admin password when prompted.

This will make the Desktop folder and the icons/preferences settings read-only.
 
ObviousTroll,

Will this terminal command prevent them from mounting/using the server?

Thanks for your help....
 
rak342,

I just tested it and it works fine. You can mount things, you just can't make permanent changes to the desktop.
 
Of course, that doesn't mean you shouldn't test it on a couple of machines before rolling it out across your lab.

;-)
 
ObviousTroll,
This script (above) will lock and hide all item on desktop but Harddrive icon. Is there a way to modify so that current alias icon are left untouch and not allow anyone to create or save to desktop.
I'm not real good with Unix commands...

Thanks for your help.
 
rak342,

That script shouldn't be *hiding* anything... I just tried it and I was able to mount disks and so on, I just couldn't add any new icons to the desktop or remove any existing files from it.

By the way: here's a script that should restore the Desktops. Call it "unlock_desktops" and run it the way you did lock_desktops:

#!/bin/bash

cd /Users
for f in *
do
if [ -e $f/Desktop ]
then
chmod ug+w $f/Desktop
chmod ug+w $f/Desktop/.DS_Store
chown $f $f/Desktop
chown $f $f/Desktop/.DS_Store
fi
done

If you want to experiment with just locking the desktop and not the icon settings, try unlocking the desktops and then editing the lock_desktops program. Delete the lines that refer to .DS_Store and re-run lock_desktops.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top