Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Scarlet Fever

macrumors 68040
Original poster
Jul 22, 2005
3,262
0
Bookshop!
At my school we have about 25 eMacs in the music room, and they arent very well implemented into the rest of the school system of windows computers. they connect to the internet, but students cant log on in their own user accounts. There are two accounts on each of the computers; teacher and student. These macs are pretty much stock standard, so they have games, MSN etc available for them to use. I found a unix script in Macworld magazine, which changes who can do what with programs. Below, i use iChat as an example:
Code:
sudo chmod o-x /Applications/iChat.app/Contents/MacOS/iChat
This script works fine, but the problem is, if i was to do that at the school, i would have to write that script for every single app on every single computer.
So here is my idea; can someone write that script with a front end on it? I was thinking the user could select an app which they want permissions changed on, select what type of permission they have (read, write, open), and the program would do the rest for you.
Thanks in advance

EDIT: I forgot to mention that know nothing about writing in most languages. Im only really starting to touch on unix.
 

Soulstorm

macrumors 68000
Feb 1, 2005
1,887
1
You can easily do that with applescript. It's been a long time since I last used it, but I remember I had made something similar.

So: Make an applescript droplet which will open when you throw a program on it.

When it opens, make it call the unix functions you said above for each of the files you threw onto the droplet.

You can do that in 30-40 lines of code with applescript. The last program I made with simple applescript (not applescript studio) is Finder Utility, which will give you an idea of what you can do. It's big, but that's only because it has many functions to perform. I wrote it when I was 15 (I'm 20 now) so, If I can do it, so can you.
 

jeremy.king

macrumors 603
Jul 23, 2002
5,479
1
Holly Springs, NC
Um...

You can already change permissions in Finder through the Get Info window, so you won't really need a program to do it. Keep in mind, permissions can only be changed by a user who has, er, permission to it...

Rereading that, I am thinking that you want to change 25 computers at once? Are these controlled by a network server of any sort?
 

yellow

Moderator emeritus
Oct 21, 2003
16,018
6
Portland, OR
Offtopic, but..

If your school system has Active Directory implemented for their Windows boxes, the Macs can be included into that for user's logins. Group Policy won't apply without 3rd party stuff though. I expect that will change in Leopard.

Ontopic, if you had Apple Remote Desktop you could send UNIX commands to all the Macs at the same time.
 

savar

macrumors 68000
Jun 6, 2003
1,950
0
District of Columbia
Scarlet Fever said:
sudo chmod o-x /Applications/iChat.app/Contents/MacOS/iChat

This script works fine, but the problem is, if i was to do that at the school, i would have to write that script for every single app on every single computer.

<Sigh>

sudo chmod -R o+x
 

jeremy.king

macrumors 603
Jul 23, 2002
5,479
1
Holly Springs, NC
yellow said:
No one said it wasn't easy to defeat.. But will the average Johhny Highschool know that (or figure it out)? :)

Very true Y, but I am curious why Johnny should be changing permissions in the first place...Seems like an admin task easily accomplished through shell scripts or the previously mentioned server based approach.
 

mkrishnan

Moderator emeritus
Jan 9, 2004
29,776
15
Grand Rapids, MI, USA
yellow said:
IMO, Johnny shouldn't be, nor should Johnny be part of the admin group to be able to use sudo..

Y can't Johnny B good? :eek:

I just wanted to add.... isn't it better, if you do have permissions to change these things (assuming you got the administrator password through "authorized" channels) isn't it better to change what a user is allowed to use from the system preferences (I presume these student accounts are limited accounts)?

Cuz otherwise, correct me if I'm wrong, but...what exactly happens when you have the sys prefs telling the computer that user X cannot use applications Y and Z, but you use sudo chmod to change the permissions to allow that user to execute it?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.