Help with understanding initial admin account vs. directory admin

Hello,
I am hoping someone can help me understand the initial admin account created when I was first configuring my server, and the directory admin.
I have setup an advanced server, and when I was going through the initial setup I created an account that for this discussion I'll call "admin." Once the initial setup was finished I started using Workgroup manager to create accounts. I was informed that I should create a different directory admin so I did and for this discussion we'll call that account "diradmin."
I am curious why the initial account of admin does not show up in workgroup manager, and why it does not show up as an option in Server Admin to assign permissions.
Is this making any sense?
Any explanation is greatly appreciated.
Thank you,
Scott

Hi
Presumably you used the Server Setup Assistant to configure Services prior to bringing the Server online?
Not a good idea really. When choosing Advanced after the Server Software has been installed don't enable/configure any service apart from Remote Desktop. Once the Server setup is complete run all available updates. Once you've done that begin to configure required Services using Server Admin. Once you've done that begin to populate your directory nodes with users using WorkGroup Manager.
The key to understanding the two accounts (a) System Administrator (admin UID 501) and (b) Directory Administrator (diradmin UID 100) is understanding which directory node you want to provide services to. The 'Local' node and the server in general (putting aside the super user 'root') will always be admin. Once you promote the Server from Standalone to OD Master you effectively create another Directory in addition to the Local one. This LDAP Directory can be used for all sorts of things. Principally enabling directory and contact information (amongst other things) to be shared/accessed with users that exist in that node with an enhanced authentication system (Kerberos) not available in the Local node and if the Server is in a Standalone Role. This LDAP Directory is controlled by diradmin. You won't be able to use admin for the LDAP node but you can use diradmin for the server in general - although I would not advise it. You can use root for both nodes - again I would not advise it unless absolutely necessary. Basically use admin to log into the Server and do the day to day stuff and use diradmin for the LDAP. Get into the habit of never having both applications open unless you are going to use them. Once you are done, quit out of them and leave them alone.
To toggle between the two Directory nodes launch Workgroup Manager and click on the small blue globe below the main set of icons at the top and above the Users/Groups/Machines tabs. You should see at least 4 selections: Local, /LDAPv3/127.0.0.1, Search Policy and Other. If you don't see /LDAPv3/127.0.0.1 select Other and browse for it. If you still don't see it then you effectively don't have an OD Master. This will severely limit the ability of server to provide auot-mounting networked home folders as well as access to iCal Server's features amongst other things.
Finally if you truly want LDAP and everything that goes with it then your DNS Service - wherever its placed - has to be correctly conigured and tested. This link is for a post that explains how to achieve this simply using the interface:
http://discussions.apple.com/thread.jspa?threadID=1251475&tstart=45
Depending on your network environment it might not be appropriate for you? However stick with it as it is a long post and you may find it useful?
Tony

Similar Messages

  • Need some help with putting a folder in users directory

    I'm not sure how to do this, but what I want to do is put this file in C:/My Documents, but I need to be able to verify that C://My Documents exists, if not put it in C:/Program Files.
    Can any one help me out?
    try {
                        String[] contactArray = parseDatFile(fc.getSelectedFile());
                        Document document = createXMLDocument(contactArray);
                        saveToXMLFile(
                        document,
                        new File(
                        "C:/Program Files/xxx/",// looks for directory for list
                        "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"));
                    } catch (Exception exc) {
                        File f = new File("C:/Program Files/xxx/");// setting directory for list if not there
                        boolean yes = true;
                        yes = f.mkdir();// creating directory
                        try {
                            String[] contactArray = parseDatFile(fc.getSelectedFile());
                            Document document = createXMLDocument(contactArray);
                            saveToXMLFile(
                            document,
                            new File(
                            "C:/Program Files/xxx/",// used only if the directory didn't exist
                            "xxxxxxxxxxxxxxxxxxxxxxx"));

    Need some help with putting a folder in users directoryI recomend using System.getProperty( "user.home" ) not a hard-coded value.
    This will use the users home folder ( C:\My Documents ) on Win9X (I guess), C:\Documents and Settings\<current user> on Win2K +, and ~ on Unix-a-likes.

  • Anyone help with linking a bank account to your apple id. The form wants a phone number I only have a UK mobile number and it doesnt sem to want to accept it keeps l;ooping me back to entering a phone number.

    Anyone help with linking a bank account to your apple id. The form wants a phone number I only have a UK mobile number and it doesnt sem to want to accept it keeps l;ooping me back to entering a phone number.

    If you are trying to setup a charge card number on the Apple Store - make sure you are in the Correct country site - icon bottom right last time I saw it - where you can change country.  

  • Help with Understanding Regular Expressions

    Hello Folks,
    I need some help in understanding the Regular Expressions.
    -- This returns the Expected string from the Source String. ", Redwood Shores,"
    SELECT
      REGEXP_SUBSTR('500 Oracle Parkway, Redwood Shores, CA,aa',
                    ',[^,]+,', 1, 1) "REGEXPR_SUBSTR"
      FROM DUAL;
    REGEXPR_SUBSTR
    , Redwood Shores,
    However, when the query is changed to find the Second Occurrence of the Pattern, it does not match any. IMV, it should return ", CA,"
    SELECT
      REGEXP_SUBSTR('500 Oracle Parkway, Redwood Shores, CA,aa',
                    ',[^,]+,', 1, *2*) "REGEXPR_SUBSTR"
      FROM DUAL;
    REGEXPR_SUBSTR
    NULLCan somebody help me in understanding Why Second Query not returning ", CA,"?
    I did search this forum and found link to thread "https://forums.oracle.com/forums/thread.jspa?threadID=2400143" for basic tutorials.
    Regards,
    P.

    PurveshK wrote:
    Can somebody help me in understanding Why Second Query not returning ", CA,"?With your query...
    SELECT
      REGEXP_SUBSTR('500 Oracle Parkway, Redwood Shores, CA,aa',
                    ',[^,]+,', 1, *2*) "REGEXPR_SUBSTR"
      FROM DUAL;You are looking for patterns of "comma followed by 1 or more non-comma chrs followed by a comma."
    So, let's manually pattern match that...
    '500 Oracle Parkway, Redwood Shores, CA,aa'
                       ^               ^
                       |               |
                               |
                               |
                      Here to here is the
                      first occurence.So the second occurance will start searching for the same pattern AFTER the first occurence.
    '500 Oracle Parkway, Redwood Shores, CA,aa'
                                        ^
                                        |
    i.e. the search for the second occurence starts heretherefore the first "," from that point is...
    '500 Oracle Parkway, Redwood Shores, CA,aa'
                                           ^
                                           |
                                          hereand there is nothing there matching the pattern you are looking for because it only has the
    "comma follwed by 1 or more non-comma chrs"... but it doesn't have the "followed by a comma"
    ...so there is no second occurence,

  • Help with understanding key event propagation

    Hello,
    I am hoping someone can help me understand a few things which are not clear to me with respect to handling of key events by Swing components. My understanding is summarized as:
    (1) Components have 3 input maps which map keys to actions
    one for when they are the focused component
    one for when they are an ancestor of the focused component
    one for when they are in the same window as the focused component
    (2) Components have a single action map which contains actions to be fired by key events
    (3) Key events go to the currently focused component
    (4) Key events are consumed by the first matching action that is found
    (5) Key events are sent up the containment hierarchy up to the window (in which case components with a matching mapping in the WHEN_IN_FOCUSED_WINDOW map are searched for)
    (6) The first matching action handles the event which does not propagate further
    I have a test class (source below) and I obtained the following console output:
    Printing keyboard map for Cancel button
    Level 0
    Key: pressed C
    Key: released SPACE
    Key: pressed SPACE
    Level 1
    Key: pressed SPACE
    Key: released SPACE
    Printing keyboard map for Save button
    Level 0
    Key: pressed SPACE
    Key: released SPACE
    Level 1
    Key: pressed SPACE
    Key: released SPACE
    Printing keyboard map for Main panel
    Event: cancel // typed SPACE with Cancel button having focus
    Event: save // typed SPACE with Save button having focus
    Event: panel // typed 'C' with panel having focus
    Event: panel // typed 'C' with Cancel button having focus
    Event: panel // typed 'C' with Save button having focus
    I do not understand the following aspects of its behaviour (tested on MacOSX although I believe the behaviour is not platform dependent):
    (1) I assume that the actions are mapped to SPACE since the spacebar clicks the focused component but I don't explicitly set it?
    (2) assuming (1) is as I described why are there two mappings, one for key pressed and one for key released yet the 'C' key action only has a key pressed set?
    (3) assuming (1) and (2) are true then why don't I get the action fired twice when I typed the spacebar, once when I pressed SPACE and again when I released SPACE?
    (4) I read that adding a dummy action with the value "none" (i.e. the action is the string 'none') should hide the underlying mappings for the given key, 'C' the my example so why when I focus the Cancel button and press the 'C' key do I get a console message from the underlying panel action (the last but one line in the output)?
    Any help appreciated. The source is:
    import javax.swing.*;
    public class FocusTest extends JFrame {
         public FocusTest ()     {
              initComponents();
              setTitle ("FocusTest");
              setLocationRelativeTo (null);
              setSize(325, 160);
              setVisible (true);
         public static void main (String[] args) {
              new FocusTest();
    private void initComponents()
         JPanel panTop = new JPanel();
              panTop.setBackground (java.awt.Color.RED);
    JLabel lblBanner = new javax.swing.JLabel ("PROPERTY TABLE");
    lblBanner.setFont(new java.awt.Font ("Lucida Grande", 1, 14));
    lblBanner.setHorizontalAlignment (javax.swing.SwingConstants.CENTER);
              panTop.add (lblBanner);
              JPanel panMain = new JPanel ();
              JLabel lblKey = new JLabel ("Key:");
              lblKey.setFocusable (true);
              JLabel lblValue = new JLabel ("Value:");
    JTextField tfKey = new JTextField(20);
    JTextField tfValue = new JTextField(20);
    JButton btnCancel = new JButton (createAction("cancel"));     // Add a cancel action.
    JButton btnSave = new JButton (createAction("save"));          // Add a sve action.
              panMain.add (lblKey);
              panMain.add (tfKey);
              panMain.add (lblValue);
              panMain.add (tfValue);
              panMain.add (btnCancel);
              panMain.add (btnSave);
              add (panTop, java.awt.BorderLayout.NORTH);
              add (panMain, java.awt.BorderLayout.CENTER);
    setDefaultCloseOperation (javax.swing.WindowConstants.EXIT_ON_CLOSE);
    // Add an action to the panel for the C key.
              panMain.getInputMap (JComponent.WHEN_IN_FOCUSED_WINDOW).put (KeyStroke.getKeyStroke (java.awt.event.KeyEvent.VK_C, 0), "panel");
              panMain.getActionMap ().put ("panel", createAction("panel"));
              // FAILS ???
              // Add an empty action to the Cancel button to block the underlying panel C key action.
    btnCancel.getInputMap().put (KeyStroke.getKeyStroke (java.awt.event.KeyEvent.VK_C, 0), "none");
    // Print out the input map contents for the Cancel and Save buttons.
    System.out.println ("\nPrinting keyboard map for Cancel button");
    printInputMaps (btnCancel);
    System.out.println ("\nPrinting keyboard map for Save button");
    printInputMaps (btnSave);
              // FAILS NullPointer because the map contents are null ???
    System.out.println ("\nPrinting keyboard map for Main panel");
    // printInputMaps (panMain);
    private AbstractAction createAction (final String actionName) {
         return new AbstractAction (actionName) {
              public void actionPerformed (java.awt.event.ActionEvent evt) {
                   System.out.println ("Event: " + actionName);
    private void printInputMaps (JComponent comp) {
         InputMap map = comp.getInputMap();
         printInputMap (map, 0);
    private void printInputMap (InputMap map, int level) {
         System.out.println ("Level " + level);
         InputMap parent = map.getParent();
         Object[] keys = map.allKeys();
         for (Object key : keys) {
              if (key.equals (parent)) {
                   continue;
              System.out.println ("Key: " + key);
         if (parent != null) {
              level++;
              printInputMap (parent, level);
    Thanks,
    Tim Mowlem

    Use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the posted code retains its original formatting.
    1) In the Metal LAF the space bar activates the button. In the Windows LAF the Enter key is used to activate the button. Therefore these bindings are added by the LAF.
    2) The pressed binding paints the button in its pressed state. The released binding paint the button in its normal state. Thats why the LAF adds two bindings.
    In your case you only added a single binding.
    3) The ActionEvent is only fired when the key is released. Same as a mouse click. You can hold the mouse down as long as you want and the ActionEvent isn't generated until you release the mouse. In fact, if you move the mouse off of the button before releasing the button, the ActionEvent isn't even fired at all. The mouse pressed/released my be generated by the same component.
    4) Read (or reread) the [url http://java.sun.com/docs/books/tutorial/uiswing/misc/keybinding.html#howto]How to Remove Key Bindings section. "none" is only used to override the default action of a component, it does not prevent the key stroke from being passed on to its parent.

  • Help with understanding multi-threaded code

    Hi Everyone,
    I am currently reading a book on multi-threading and up until recently I have been able to understand what is going on. The thing is the complexity of the code has just jumped up about two gears without warning. The code is now using inner classes which I am trying to develop an understanding of but I am not finding it easy going, and the book has been lite on explanations. If anybody can help with the following code it will be really appreciated.
    public class SetPriority extends Object
         private static Runnable makeRunnable()
              Runnable r = new Runnable()
                   public void run()
                        for(int i=0; i<5; i++)
                             Thread t = Thread.currentThread();
                             System.out.println("in run() - priority=" + t.getPriority() +
                                          ", name=" + t.getName());
                             try{
                                  Thread.sleep(2000);
                             }catch(InterruptedException x){
                                  //ignore
              return r;
         public static void main(String[] args)
              Thread threadA = new Thread(makeRunnable(), "threadA");
              threadA.setPriority(8);
              threadA.start();
              Thread threadB = new Thread(makeRunnable(), "threadB");
              threadB.setPriority(2);
              threadB.start();
              Runnable r = new Runnable()
                   public void run()
                        Thread threadC = new Thread(makeRunnable(), "threadC");
                        threadC.start();
              Thread threadD = new Thread(r, "threadD");
              threadD.setPriority(7);
              threadD.start();
              try{
                   Thread.sleep(3000);
              }catch(InterruptedException x){
                   //ignore
              threadA.setPriority(3);
              System.out.println("in main() - threadA.getPriority()=" + threadA.getPriority());
    }My greatest challenge is understanding how the makeRunnable() method works. I don't understand how this inner class can be declared static and then multiple "instances" created from it. I know that I have no idea what is going on, please help!!!
    Thanks for your time.
    Regards
    Davo
    P.S.: If you know of any really good references on inner classes, particularly URL resources, please let me know. Thanks again.

    Yikes!! The good news is that you're unlikely to see such convoluted code in real life. But here we go.
    "private static Runnable makeRunnable()" declares a method that returns objects of type Runnable. The fact that the method is declared "static" is pretty irrelevant - I'll describe what that means later.
    The body of the method creates and returns an object of type Runnable. Not much special about it, except that you can give such an object to the constructor of class Thread and as a result the run() method of this Runnable object will be called on a new thread of execution (think - in parallel).
    Now the way it creates this Runnable object is by using the "anonymous inner class" syntax. In effect the method is doing the same as
    public class MyNewClass implements Runnable {
        public void run() {
            // All the same code inside run()
    public class SetPriority {
        private static Runnable makeRunnable() {
            Runnable r = new MyNewClass();
            return r;
        // The rest of the original code
    }Except you don't bother declaring MyNewClass. You're not interested in defining any new method signatures. You just want to create an object that implements Runnable and has certain instructions that you want inside the run() method. Think of the whole approach as shorthand.
    Think about this for a while. In the mean time I'll write up the "static".

  • Help with understanding the Home Folder plus User Accounts

    I just got the IMac (replacing an ageing...that is an understatement...Grape iMac from long ago) and this is my first go at the OSX. My previous iMac had OS9.2
    I am having a problem understanding the Home folder and the Users to a point. The concepts are fine, it is the changing of names that is the problem. When I first started the iMac and went through the set-up and finally looked at the file structure, there was the Home Folder with a name, which i guess was pre-entered during set-up since I did not enter it (lets call it JOE). There was also 1 User, JOE with all the iLife folders. Since I did not like the name, i went to the Systems Preferences, into Accounts and found that JOE is an Admin. So, I changed the name to, lets say BILL, who still is an Admin. I also changed some settings and made BILL the auto log account. OK so far I am happy. I go back to the HD and find that now there are 2 users (folders), BILL and JOE, and that the Home Folder is still named JOE butall the iLife files are now under BILL.
    So I went and also renamed the Home Folder to BILL, so everything looks fine. But when I restarted the iMac latter it lost all the settings (mouse, etc.) This is really getting confusing.
    Here is what I want to do (after some reasearch):
    I want to change the Short Name (JOE) but so far I have read that you can not do that. Where did this name come from (basically my first initial and my last name) because I don't want my Home Folder to be named that. I found somewhere that the only way to do that is an Erase and Install. I am willing to do that since I have a backup of all the iLife files on an external disk anyways and I have not put anything new yet.
    Can someone enlighten me as to what would be the best course of action....this Short Name thing is frustrating.
    iMac 20" 2.33MHz   Mac OS X (10.4.9)  

    Welcome To Discussions kapklo!
    First you need to sort out the extra Home folder issue, that was created by changing the Short Names.
    The info in one or more of the articles linked to below, will help you with that.
    Return to Default Desktop, Apparent "Loss" of Home Directory
    My home folder and desktop are different than before
    Recover from renaming your Home folder, authored by Dr Smoke
    Then you can change the Short Name using this Change Short Name The Easy Way.
    Or you could do an Erase & Install, making sure you enter your preferred Short Name, during the setup process.
    ali b

  • Help with two computers, two accounts on one apple tv

    I'm about ready to pull the trigger on an apple tv to add to my building home theater system. My biggest desire in getting the apple tv is mainly for music streaming to my speaker system. So here is my question. My wife and I both have our own separate itunes accounts, separate itunes libraries on our own macbooks. My question is if it will be a problem to access both of those itunes libraries through the apple tv. I have the remote app for my iphone and can control both of our libraries with that, and can switch between both easily on the iphone, but will the apple tv be able to play different libraries without difficulty? I don't know if i need to set up home sharing because both libraries are currently on different accounts, so i don't even know if it's possible.
    Any help, suggestions, or ideas would be appreciated.

    JKStraw - but you understand that when you use the appleTV you can stream from a computer without "taking over" the iTunes on that computer?
    there are two mode for streaming to an appleTV..
    1) you can stream what is being played on a computer's iTunes Library through airPlay and remote control the iTunes on the computer with the remote app
    OR
    2) you can just access the files in a computers iTunes Library from the appleTV without affecting the computer at all.. you could be playing a song on iTunes or not on the computer and be playing a completely different song on your appleTV.. you just enable home sharing on the appleTV and computer.. from appleTV you just go computers > +the name of the iTunes Library+ and you can access all your songs, video etc on that computer without affecting that computer at all..
    on the remote app you can link to an appleTV and 1) just use gestures to navigate the appleTV or 2) skip the appleTV GUI altogether and view what's available directly from the remote app.. click on something and it plays.. again this in no way affects what's happening on the computers the appleTV is linked to..

  • Help with signing in to account please! :-)

    i have been a paying skype subscription customer since 2006 - 2008 with a world subscription at every three months.
    there are a few things i'd like to tackle.
    i cannot remember my skype password, i cannot reset it, it alwasy directs me to use microsoft account but i cannot use that to sign in to skype. =S i have used up all my tokens and have to wait 24 hours but i need to access my account NOW.
    I am wondering if my account has been hacked...?
    some months back when I restart my computer (mac osx 7.5) it started asking me upon start up if i want to allow skype to allow incoming data or something like that. I have NEVER had that happen before. so sometimes i allow and sometimes i deny. i thought maybe it is something new maybe with an update i don't know...
    is this normal?
    so since i cannot remember my password i went to keychain access and i select show password and put in my admin password and it will not show it but under the account field in keychain access it says .token.0.
    a couple few years back somehow there was a malicious charge made to my bank account adn i had to get a new bank account it was a nightmare and i happend to notice this right a couple days before flying overseas to be gone for several months. anyway, i was going through my records and saw taht at 10 dollar charge was made 23 may 2013. i dont recall purchasing skype credit and since my 26.95 charge was done just a couple days after this why would i need more credit? i dont know it is STRANGE. this was something similar to what happend a while back.
    it says that with the world subscription i am supposed to be given a small amount of credit but over the years i have never seen this why not? and where can i get it?
    it was so frustrating to try to get help, i wanted so much to do chat support but i cannot sign in because I cannot remember my password. =S fortuantly i still have my skype set to sign in automatically so i can still chat and call via there but i need to access my account to find payment history.
    i am looking forward so very much to hear from anyone as soon as possible. I have sent this request to personal people here on this webpage and have heard NOTHING... which on the help page for skype is says it is a helpful community. I am starting to wonder about that. Please help anyone.
    thank you very kindly for your valuable time.

    I have attached a file below to show that i am just getting noWHERE with this apparent help to sign in. in the second to last picture you will notice it says reset microsoft password. BUT I DONT NEED TO. the very last photo showes that there is a distinct individual option to reset just the skype password and i cannot do that using the code that they have emailed me. i just want to reset my skype account.
    PLEASE SOMEONE HELP.
    i have been asking help since thrusday.
    Attachments:
    skype help.pdf ‏501 KB

  • Need a Little Help with Understanding How Layers Work in PSE

    I have PSE version 5 and I am using it on a PC with Windows XP.
    As I get more into editing photos, I am enjoying it, but confusion is also starting to set in.  My question is about layers.  When I go to edit a photo for web/email use only, I start by resizing it to 72 ppi and then reducing the pixel dimensions quite a bit.  Then after that I normally go through this process of editing the photos by using normally about three different commands.  One is Levels, then I may go to Shadows/Highlights, and then my last command is always sharpening.  I used to do this all on one layer, but then finally learned to put each one of these editing features on their own layer so I can make changes/deletions without too much trouble.
    When I started doing the separate layers, I was just making a copy of the background layer each time and then touching that particulay layer up with Levels, Sharpen or Shadows/Highlights.  But I noticed that depending on the order in which the layers were placed, some changes would be obscured.  If I put the Levels layer on top, and then the Sharpen layer and the Shadows/Highlight layer below that, the sharpen effect and the shadows/highlights effects were no longer there.  I could only see the levels effect.  The photo was still not sharp and so on.  If I put the Sharpen level on top, then the photo showed the sharpen effects, but now the Levels and Shadows/Highlights effects were no longer visible.
    So then I started to make a copy of the background initially, do a levels adjustment here, then, instead of making a copy of the original background layer again, I would make a copy of the layer that now has the levels changes on it.  Then do the sharpen effect on this layer.  This way I had all the changes on one layer as long as I put that layer as the top layer.  But then I realized that I once again fI didn't have a layer with only one fix on it.   Finally, I started to use an adjustment layer for Levels, put this as the top layer, make a copy of the background layer, do shadows/highlights, copy background layer again, do sharpen, and this seems to work a little better.  But even with this way, depending on what order I place the sharpen and shadows/Highlights layers, one of them still seems to get obscured by the layer above it.
    Can someone help me to understand how layers work in this regard.  I am obviously a little confused here.
    Thanks,
    Lee

    You really aren't working efficiently. First of all, do your editing on a full sized version of the photo, since you have more data for PSE to work on and will get better results. Use save for web to make your web/email copy when you are totally done. You can resize it down on the right side of the save for web window.
    Duplicating a regular layer makes an opaque layer that obscures the layers below it. It's best to start off by not working on your original image, so that you don't have to worry if you mess up. If you're working on a copy, you can work right on the background layer, or only duplicate the layer once and apply your changes to that. So you'd apply both shadows/highlights and sharpening to the same layer.
    Finally, you should use an adjustment layer for levels. Layer>New Adjustment Layer>Levels. This will put levels on a transparent layer above your image, but you will need to click the layer below it to get back to a pixel layer to apply other changes (you can't sharpen an adjustment layer, for example).

  • Help with sharing multiple iTunes accounts

    Hello all,
    I have encountered a number of issues regarding my iTunes account.
    I live in California and my girlfriend lives abroad. I wonder if we could add our iTunes accounts into our own computers so that we could both share our purchases (apps, music, movies, and more)?
    Could anyone please provide me with the detail information?
    I sincerely appreciate all the help.
    Thanks

    No, sorry. You cannot merge AppleIDs nor can you transfer purchases. No way around that at this time.

  • Help with Applescript and Admin Privelages

    I just started using Applestript a few months ago and I can't figure out how to give my script Admin rights. Basically, it turns on and off my internet sharing and file sharing through dialog boxes. I copied and pasted the whole code below if you want to test it, but this is the part that is giving me trouble. There are 4 lines similar to this, the actions that turn on or off the services.
    do shell script "/bin/launchctl load -w /System/Library/LaunchDaemons/com.apple.InternetSharing.plist" with administrator privileges
    I've tried adding "with password _____" and "password_____" but neither worked. Can anyone help me make this script authenticate itself so I don't need to keep typine in my password? I could easily make a keystroke in system events to type it in but it doesn't always ask for it so I don't know how I'd make the script know when it needs to enter the password. any help is much appreciated!
    Some things to clarify: The first shell script is there to invoke the "authentication" dialog so I can sign in once I launch the app and get right into the settings. However, I'd like to make it so the script doesn't even need admin permission to run, or make it somehow have my password built in to it. Security is not an issue, its my personal computer that nobody else has access to so I really don't care if my password is written in the code. Also, if you have any tips on how to streamline the Quit/Hide/Resume dialog I'd appreciate that too. Resume is there because there's a chance I won't have to sign in again if the app does not quit, however more often than not I have to sign in anyways. Thanks again in advance, sorry this post is so long but like I said, I'm pretty new to all this so I don't know exactly what you need to be able to help me.
    The Whole Script:
    -- Variables and Authentication
    set done to "n"
    set quitapp to "no"
    display dialog "Please enter your password to allow Sharing Manager to make changes to your settings." with icon caution
    do shell script "/bin/launchctl unload -w /System/Library/LaunchDaemons/com.apple.AppleFileServer.plist" with administrator privileges
    delay 0.2
    -- Repeats
    repeat while quitapp is "no"
              repeat while done is "n"
      -- Choose Setting
                        display dialog "Choose Setting to Edit" buttons {"Internet", "File Sharing", "Exit"} default button 3
                        set the button_pressed to the button returned of the result
                        if the button_pressed is "Internet" then
      -- Commands for Internet Settings
                                  display dialog "Internet Sharing" buttons {"On", "Off", "Cancel"} default button 3
                                  set the button_pressed to the button returned of the result
                                  if the button_pressed is "On" then
                                            do shell script "/bin/launchctl load -w /System/Library/LaunchDaemons/com.apple.InternetSharing.plist" with administrator privileges
                                  else if the button_pressed is "Off" then
                                            do shell script "/bin/launchctl unload -w /System/Library/LaunchDaemons/com.apple.InternetSharing.plist" with administrator privileges
                                  end if
                        else if the button_pressed is "File Sharing" then
      -- Commands for Sharing Settings
                                  display dialog "File Sharing" buttons {"On", "Off", "Cancel"} default button 3
                                  set the button_pressed to the button returned of the result
                                  if the button_pressed is "On" then
                                            do shell script "/bin/launchctl load -w /System/Library/LaunchDaemons/com.apple.AppleFileServer.plist" with administrator privileges
                                  else if the button_pressed is "Off" then
                                            do shell script "/bin/launchctl unload -w /System/Library/LaunchDaemons/com.apple.AppleFileServer.plist" with administrator privileges
                                  end if
                        else
                                  set done to ""
                        end if
              end repeat
      -- Confirm Quit/Hide
              display dialog "Really quit? You will have to reenter admin info next time." buttons {"Quit", "Hide", "Resume"} default button 1
              if the button returned of the result is "Quit" then
                        set quitapp to ""
              else if the button returned of the result is "Hide" then
                        tell application "System Events"
      keystroke "h" using command down
                        end tell
              else
                        set done to "n"
                        set quitapp to "no"
              end if
    end repeat

    with respect to general improvements, a couple of points:
    If I'm reading this script correctly, it looks like you're putting up an applescript alert and leaving it hanging until it's dismissed.  This is an atypical approach (applescripts aren't really meant to hang around indefinitely waiting for a respons).  If I were doing this I would either go whole-hog and create an applescript application in XCode with a proper interface, or remove the hanging dialog and create a set of toggle scripts that I could use from the script menu.  if you really want to keep the hanging dialog, though, you can streamline it by absorbing the secondary dialogs into the main dialog.  that's like so:
    set netSharingStatus to checkService("com.apple.InternetSharing")
    set fileSharingStatus to checkService("com.apple.AppleFileServer")
    display alert "Current Settings" message "Click to change settings" buttons {"Internet " & netSharingStatus, "File Sharing " & fileSharingStatus, "Exit"} default button 3
    -- choose next action based on the button clicked and the status vairable
    on checkService(service)
              do shell script "launchctl list"
              if the result contains service then
                        return "On"
              else
                        return "Off"
              end if
    end checkService
    using handlers like the above can also streamline the rest of your script.  the following construction means you only have to write the do shell script line once, rather than the four times you currently do, and makes for much cleaner reading.
    if the button_pressed starts with "Internet" then
              toggleService("com.apple.InternetSharing", netSharingStatus)
    else if the button_pressed starts with "File Sharing" then
              toggleService("com.apple.AppleFileServer", fileSharingStatus)
    else
      --exit routine
    end if
    on toggleService(service, currentState)
              if currentState in "On" then
                        set action to "unload"
              else
                        set action to "load"
              end if
              set command to "/bin/launchctl " & action & " -w /System/Library/LaunchDaemons/" & service & ".plist"
              do shell script command user name "adminusername" password "password" with administrator privileges
    end toggleService

  • Can anyone help with icloud and apple accounts getting mixed up on 2 phones?

    Basically husband upgraded from 4s to 5c. Gave dad 4s. I tried to set his dad up with icloud and apple id but didn't realise husbands old sim card was in 4s. Now neither phone works and husband very annoyed his apple id and password don't work anymore. Please help!!!

    Hi Chris
    So husband got new phone. Was all set up and up and running when we left the shop
    Gave dad the old phone. It was locked to Vodafone so we had to ask them to unlock. He then got his three sim cut down to fit.
    Weeks after husband had his 5c we went to dads to set his 4s up. I upgraded it to latest software iOS something. Anyway didn't realise it was husbands old sim still in phone.
    After upgrade it asked me to set up apple account (I think) could have been icloud. Anyway I started setting it up with dads email and password choice. Husband then saw message on his 5c saying his dads email was being added to something on his phone.
    At this point I left alone but now when husband tries to use his apple id for apps etc it says invalid user id or password. It's as though the 2 have got mixed up. Bit it won't let him reset his password?
    Does this make sense?

  • Need help with Rules for mail accounts

    Today I deleted a rule for a mail account and now I cant receive mail in 4 of 8 accounts. I'm not experienced with Mac's Mail program. Id there something you have to do for multiple accounts to recieve all mail? I can send but not receive.
    Help!
    ~ Tammy

    It's hard to believe that deleting a rule could have a bearing on the ability to receive messages from any account... unless that rule did something that prevented subsequent rules to process the messages that you apparently can't receive now.
    That is, either having deleted the rule has absolutely no bearing on your problem, or the problem is that those messages are now being processed in an unexpected way by some of your other rules.
    What type of accounts are these (POP, IMAP, .Mac)? What does "I cant receive mail in 4 of 8 accounts" mean?

  • Help with Blocking/Unblocking GL account for posting

    We have a current program to block/unblock GL accounnts for posting and it does direct table update. But this way the user does not know the HISTORY about who did the update. I came to know that by using BDC, history gets created about who made the changes. I am still new to ABAP and with transaction code FS02 I cannot acheive this (blocking/unblocking GL account for posting).
    Is there any other transaction code that would let me do this?
    Is there an easy way of finding out the correct transaction code?
    I found FSSO which is pretty close but my lead said it is not the correct one! Does anyone happen to know the correct transaction code that would let me do blocking/unblocking for G/L account posting?
    Thanks.
    --Mithun

    Hi Mithun,
    FS00 txn is used for blocking GL a/c for posting.
    You can block/unblock GL a/c based on GL A/c and Company code.
    Execute FS00 txn, Click GL account -> Block (in the menubar).
    Block/Unblock based in chart of accounts or in company code.
    Cheers,
    Vikram
    Pls reward for helpful replies!!

Maybe you are looking for

  • ITunes not recognizing original IPod touch after new one installed

    I tried to set up new IPod touch but itunes wouldn't recognize it. Downloaded latest version of itunes. Was able to set up new IPod touch but now old touch not being recognized by itunes. Went through the troubleshooting guide with no positive result

  • Loading MXML Component Dynamically

    Hi all, I am new to Flex and was trying out small things . I created a MXML Application and also MXML components. I tried loading MXML component to application using xmlns and it worked fine.( <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml

  • JDBC  Adapter how to select multi format files on AS/400

    Hi all, i want to access a multi format file in a AS/400 Library via JDBC Adaptor. When i try to 'select * from XXXX.FILEN' i get an error "SQLException during query 'select * from XXXX.FILEN': java.sql.SQLException:[SQL7003]File FILEN in XXXX has mo

  • How good is the new Adobe Reader IOS for fillable forms and interactive pdfs?

    At last adobe reader for ios has been updated so now fillable forms can be completed on ipad/iphone but how good is it? I've tested a form and reset form/print form and save as buttons do not seem to work. Form submit seems ok, just wondered what oth

  • RE:me32k

    Hi, I got a requirement like this I will enter the agreemet no in me32k and hit enter.again i will select a line item in the table control and from the menu bar i will select price simulation,it takes me to another screen having a table control which