program idea

Discussion in 'Mac Programming' started by Scarlet Fever, May 27, 2006.

  1. macrumors 68040

    Scarlet Fever

    Joined:
    Jul 22, 2005
    Location:
    Bookshop!
    #1
    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.
     
  2. macrumors 68000

    Soulstorm

    Joined:
    Feb 1, 2005
    #2
    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.
     
  3. macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #3
    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?
     
  4. Moderator emeritus

    yellow

    Joined:
    Oct 21, 2003
    Location:
    Portland, OR
    #4
    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.
     
  5. macrumors 68000

    savar

    Joined:
    Jun 6, 2003
    Location:
    District of Columbia
    #5
    <Sigh>

    sudo chmod -R o+x
     
  6. Moderator emeritus

    yellow

    Joined:
    Oct 21, 2003
    Location:
    Portland, OR
    #6
    No one said it wasn't easy to defeat.. But will the average Johhny Highschool know that (or figure it out)? :)
     
  7. macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #7
    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.
     
  8. Moderator emeritus

    yellow

    Joined:
    Oct 21, 2003
    Location:
    Portland, OR
    #8
    IMO, Johnny shouldn't be, nor should Johnny be part of the admin group to be able to use sudo..
     
  9. Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #9
    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?
     

Share This Page