Creating a login hook?

I am looking to create a script that runs each time when i log in to my mac.
Although I am stuck at what to write in the script?
I am looking for the script to open 'Safari' (2 tabs if possible) and 'Microsoft Messenger for Mac' at log in.
Any help would be appreciated.
Thanks in advance.

Hello, I can get you 2/3's the way there. Open System Preferences>Accounts then make sure your account is highlighted. Then, above your pic, click on "login Items".
These are the items that will automatically start when you boot. To add Safari and Messenger, click on the "+" in the lower left. Navigate to the Applications folder and choose the apps.
I will have to look at opening two tabs but that will get you started.
Cheers,
Glynn

Similar Messages

  • Debugging a non-working login hook

    I'm setting up labs in a school, some have 2008 iMacs, 2007 iMacs, 2007 Macbooks and powerbook g4's. I have a new 2008 iMac as my master image and I've set-up a LoginHook in com.apple.loginwindow.plist that runs a script that works just great. It does what I expect it too. I need this LoginHook to work on all the platforms. So far, when I migrate accounts from the iMac 2008 to a Macbook or Powerbook, that LoginHook no longer works. Period.
    The com.apple.loginhook.plist copies over, the filesize, permissions and ownerships are the same, the script copies over, permissions and ownerships are the same. I can manually sudo the script and it works. I've added echo statements to an output file in the script, but no output is created.
    And I see in the system.log file, in the system where this works, entries for my echo statements like:
    Aug 4 10:54:32 "hostname" com.apple.loginwindow[389]: this user is student
    which lets me see the script is running.
    I don't see mny messages like this on the system that doesn't work.
    I've also tried migrating accounts from a machines of the same type (ex: macbook > macbook), but the LoginHook doesn't work.
    What is in charge of launching the com.apple.loginwindow.plist? launchd?
    Any ideas on why the LoginHook would just conk out like this?

    did you make your login hook following these instructions? remember that the loginwindow plist that is used is the one in roots home directory not in /Library/Preferences. That said, I had some problems with login hooks too and never could figure out why mine didn't run so I created a separate launch daemon to run the script i wanted. you can put it in /Library/launchAgents and it will execute whenever anyone logs in. that worked for me.

  • Yosemite profile manager login hook

    Hi.  We have recently purchased a Mini running Yosemite server.  The server is running profile manager and an open directory server, it is bound to active directory.  This is all working, however I would like to roll out a login script for users.  I have created this script and it works when run manually, however is there a way to specify this to run via Profile Manager?  If the script is located on a server, how can I have a client run this script remotely?  I want to push this out automatically so I don't need to go to all the laptops throughout the company.  Thanks

    If the Login Hook works on your machine, maybe the best way to share the script is using Apple Remote Desktop. But your machines have to be prepared for the remote maintenance.

  • Portable Home Directories and Login Hooks

    We recently switched from Network Home Directories to Portable Home Directories. We used to use login hooks to do all kinds of nifty things to a user's home folder at login, but now it's complicated. I can't figure out at what point in the login+sync process the login hook executes.
    If the login hook executes before syncing, then I need to modify the network copy of the home folder, i.e. Network/Servers/servername/.../username. If the login hook executes after syncing, then I need to modify the local copy of the home folder, i.e. /Users/username. Unless I'm mistaken, you can't just use the tilde (~) in the script to denote the path the home folder, so you have to list the path explicitly.
    My testing seemed to result in inconsistent behavior. Can anyone give me some guidance?
    (Keywords: Loginhook Logouthook Login Script Logout Script Mobility Mobile PHD)

    Thank you for the advice, Syth, but I'm already aware of the basics of writing and implementing login and logout hooks. I wrote a lot of them when we were using Network Home Directories. The root of my question has to do with Portable Home Directories and login hooks.
    This is a computer lab environment where every user has their own account, network home folder, and "Mobility" preferences set in Workgroup Manager. When a user logs into a lab computer, syncing kicks in and they work from a local copy of their home folder which then syncs to the server at login and logout.
    So the core question is: Do login and logout hooks execute before or after login/logout home syncing occurs?
    For example, if a user with a brand new network account, i.e. who doesn't even have a network home yet, logs into a computer, what's the order of events? I would hope it would be:
    1) server creates network home
    2) computer creates local home, i.e. syncs
    3) login hook executes
    But my testing has been inconsistent. Anyone have any experience or insights to share?

  • Login hook question

    I am trying to use login and logout hooks to mute the speaker after logout and unmute it at login in order to get rid of that startup chime (always wakes up my sleeping roommate). The problem is when I follow the procedures at: http://docs.info.apple.com/article.html?artnum=301446 (i have tried both ways); however it seems as though my scripts are not run, is there something special that I have to do because I am running an Intel version of 10.4.8?
    my scripts are as follows:
    login.sh:
    echo "test" >> /loginScriptHit.txt
    osascript -e 'set volume output muted false'
    logout.sh:
    echo "test" >> /logoutScriptHit.txt
    osascript -e 'set volume output muted true'
    I know the scripts are not being run because the text files are not being created.
    Thanks:
    ~Xavier

    Good to hear you got it working.
    If you don't mind me commenting, there are a few borderline security issues with your setup (related to login window hooks running as "root") that might be worth reviewing. In general, for things running as "root", it is good practice to specify the full path to the executable to avoid problems with aliases, functions or ambiguities in the PATH, so eg. using '/usr/bin/osascript' might be better (I'm not sure what to do with the 'echo' since it is a shell "built-in" command, but you could use '/bin/echo' I suppose).
    The script, and the output file are both in areas potentially writable without a password. "/Users/Shared" is world writable, and "/" is writable by any admin user, without a password. In both cases, the "sticky bit" will provide some protection, but if the files were to be removed without removing the login hook, someone could potentially substitute their own files - their own script (which would run as "root") or a symbolic link to something important in the case of the output file, which could lead to data loss.
    The script itself is writable by the owner (presumably you) without a password so if anyone were to sit down in front of the computer while you weren't looking, they could add their own code (no password required), which would again run as "root".
    To exploit any of these issues would require inside knowlege that you have the hooks set up and how (since they are specified in a location that requires "root" access even to read), so it isn't likely that they would ever become a problem, but they might be good to keep in mind as things to avoid. In general, make sure anything that runs as "root" or can influence a process that runs as "root", is kept in a secure area that requires "root" privileges to modify any point on its path, and that any item itself is only modifiable by "root".

  • Login Hook

    Does anyone have any experience creating Apple MAC OS X 10.5.6 Login Hook scripts?
    I need to create one that maps a users network folder (stored on an Apple Xserve) to the desktop when they log onto a MAC. The Login Hook needs to work for roaming user accounts so that the network folder loads no matter what MAC the user logs onto...

    ..."unzip com.prefs.zip […]
    the original owner is "user:staf" but change to "root:admin""...
    Login window hooks run as "root" so when unzipping, the newly expanded files, which by default take the owner of the user performing the unzip, will be owned by "root". Perhaps try 'unzip -X' as one possible option if the original zip was created from files with the intended "user" and "group".
    Another possibility is to run '/usr/bin/sudo -u username /usr/bin/unzip'... so that "unzip" is run as the user (and don't forget the $1 option to run as whatever user is logging in, although that fails in some network settings, or at least it did in earlier versions).
    Depending on the situation, using a launch agent to run the script might be more appropriate...

  • Is there a way to create user logins or some other way to ...

    Is there a way to create user logins or some other grouping for a set of applications to use (memory) resources optimally -- for example only mail and Safari and Word in one grouping and another for Safari and an audio recording application, etc.?

    It is possible to use Parenal Controls to limit which applications can be used be a particular user account.
    But it's not really necessary as far as managing memory.
    Matt

  • How do I create a Login in feature for a site created with MUSE

    I am working on a web site and the client needs a Login feature. How can this be achieved with MUSE?

    Hi,
    please take a look to this thread Can I create a login/password protection in Muse for a HTML5 page or two?

  • I m using ms access as database and i want to create a login page in java

    hye frnz... plz help me m new to java
    m using ms access as database and try to create a login page where user type username and pw
    i had enter valid user entries in database i checked connectivity is working i want as user login the main window must open after checking username and pw field to database but
    now there is an error class not found exception sun:jdbc...... error
    plz help me i had stuck frm 4 days */
    import java.sql.DriverManager;
    import java.sql.Connection;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    class Login extends JFrame
    //Component Declarations
    JLabel jlb1,jlb2;
         JTextField jtf1;
         JPasswordField jpf1;
         JButton jb1,jb2;
         //Constructor
         Login()
         //frame settings
              setTitle("Login Dialog");
              setLayout(new GridBagLayout());
              GridBagConstraints gbc = new GridBagConstraints();
              setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              Dimension d= Toolkit.getDefaultToolkit().getScreenSize();
              setBounds(d.width/2-175,d.height/2-100,350,200);
              gbc.insets=new Insets(7,7,7,7);
         //adding components
              jlb1=new JLabel("User ID");
              gbc.gridx=0;
              gbc.gridy=0;
              add(jlb1,gbc);
              jlb2=new JLabel("Password");
              gbc.gridx=0;
              gbc.gridy=1;
              add(jlb2,gbc);
              jtf1=new JTextField(10);
              gbc.gridx=1;
              gbc.gridy=0;
              add(jtf1,gbc);
              jpf1=new JPasswordField(10);
              gbc.gridx=1;
              gbc.gridy=1;
              add(jpf1,gbc);
              jb1=new JButton("Login");
              gbc.gridx=0;
              gbc.gridy=2;
              add(jb1,gbc);
              jb1.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                   Connection conn=null;
                        Statement stmt=null;
                        boolean found=false;
                   try
                             Class.forName("sun.jdbc.driver.JdbcOdbcDriver");
                             String dataSourceName = "Inventory";
                             String dbURL = "jdbc:odbc:" + dataSourceName;
                             conn=DriverManager.getConnection(dbURL, "","");
                             stmt=conn.createStatement();
                             ResultSet rst=stmt.executeQuery("Select * from User");
                             System.out.println(jtf1.getText()+"/t"+jpf1.getPassword());
                             while(rst.next())
                                  System.out.println( rst.getString(1) +"/t"+ rst.getString(2));
              if(jtf1.getText().equals(rst.getString(1).trim()) && new String(jpf1.getPassword()).equals(rst.getString(2).trim()))
                                       found=true;
                                       rst.close();
                                       dispose();
                                       MainWindow mw= new MainWindow();     /*created min window object created to be opend after login but not working*/     
                                       break;
                             rst.close();
                             stmt.close();
                             conn.close();                    
                        catch(ClassNotFoundException e){System.out.print(e);}
                        catch(Exception e){System.out.print(e);}
                        if(found==false) /*this portion is executing and dialog box appears invalid name and pw with class not found exception sun:jdbc.......on console */
                             JOptionPane.showMessageDialog(null,"Invalid username or password",
                                  "Error Message",JOptionPane.ERROR_MESSAGE);
              jb2=new JButton("Clear");
              gbc.gridx=1;
              gbc.gridy=2;
              add(jb2,gbc);
              jb2.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        jtf1.setText("");
                        jpf1.setText("");
                        jtf1.requestFocus();
              setSize(350,200);
              setVisible(true);
              jtf1.requestFocus();
         public static void main(String args[])
    Login l=new Login();
    }

    http://forums.oracle.com/forums/ann.jspa?annID=599
    Oh, and by the way, your keyboard seems to be broken as your words are not getting spelled correctly.

  • Plz help using ms access as database,i want to create a login page in java

    hye frnz... plz help me m new to java
    m using ms access as database and try to create a login page where user type username and pw
    i had enter valid user entries in database i checked connectivity is working i want as user login the main window must open after checking username and pw field to database but
    now there is an error class not found exception sun:jdbc...... error
    plz help me i had stuck frm 4 days */
    import java.sql.DriverManager;
    import java.sql.Connection;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    class Login extends JFrame
    //Component Declarations
    JLabel jlb1,jlb2;
         JTextField jtf1;
         JPasswordField jpf1;
         JButton jb1,jb2;
         //Constructor
         Login()
         //frame settings
              setTitle("Login Dialog");
              setLayout(new GridBagLayout());
              GridBagConstraints gbc = new GridBagConstraints();
              setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              Dimension d= Toolkit.getDefaultToolkit().getScreenSize();
              setBounds(d.width/2-175,d.height/2-100,350,200);
              gbc.insets=new Insets(7,7,7,7);
         //adding components
              jlb1=new JLabel("User ID");
              gbc.gridx=0;
              gbc.gridy=0;
              add(jlb1,gbc);
              jlb2=new JLabel("Password");
              gbc.gridx=0;
              gbc.gridy=1;
              add(jlb2,gbc);
              jtf1=new JTextField(10);
              gbc.gridx=1;
              gbc.gridy=0;
              add(jtf1,gbc);
              jpf1=new JPasswordField(10);
              gbc.gridx=1;
              gbc.gridy=1;
              add(jpf1,gbc);
              jb1=new JButton("Login");
              gbc.gridx=0;
              gbc.gridy=2;
              add(jb1,gbc);
              jb1.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                   Connection conn=null;
                        Statement stmt=null;
                        boolean found=false;
                   try
                             Class.forName("sun.jdbc.driver.JdbcOdbcDriver");
                             String dataSourceName = "Inventory";
                             String dbURL = "jdbc:odbc:" + dataSourceName;
                             conn=DriverManager.getConnection(dbURL, "","");
                             stmt=conn.createStatement();
                             ResultSet rst=stmt.executeQuery("Select * from User");
                             System.out.println(jtf1.getText()+"/t"+jpf1.getPassword());
                             while(rst.next())
                                  System.out.println( rst.getString(1) +"/t"+ rst.getString(2));
              if(jtf1.getText().equals(rst.getString(1).trim()) && new String(jpf1.getPassword()).equals(rst.getString(2).trim()))
                                       found=true;
                                       rst.close();
                                       dispose();
                                       MainWindow mw= new MainWindow();     /*created min window object created to be opend after login but not working*/     
                                       break;
                             rst.close();
                             stmt.close();
                             conn.close();                    
                        catch(ClassNotFoundException e){System.out.print(e);}
                        catch(Exception e){System.out.print(e);}
                        if(found==false) /*this portion is executing and dialog box appears invalid name and pw with class not found exception sun:jdbc.......on console */
                             JOptionPane.showMessageDialog(null,"Invalid username or password",
                                  "Error Message",JOptionPane.ERROR_MESSAGE);
              jb2=new JButton("Clear");
              gbc.gridx=1;
              gbc.gridy=2;
              add(jb2,gbc);
              jb2.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        jtf1.setText("");
                        jpf1.setText("");
                        jtf1.requestFocus();
              setSize(350,200);
              setVisible(true);
              jtf1.requestFocus();
         public static void main(String args[])
    Login l=new Login();
    Edited by: 795772 on Sep 19, 2010 4:44 AM

    795772 wrote:
    hye frnz... plz help me m new to java
    m using ms access as database and try to create a login page where user type username and pw
    i had enter valid user entries in database i checked connectivity is working i want as user login the main window must open after checking username and pw field to database but
    now there is an error class not found exception sun:jdbc...... error
    plz help me i had stuck frm 4 days */
    <snip>The subject of this forum is Oracle databases. How does your problem relate to that subject?
    Two bits of advice:
    1) Make sure you ask questions in a forum related to your problem.
    2) If you want to be taken seriously as a professional, drop the MS IM Speak and use the language of the forum. In this forum it is English, which is successfully used by many people for whom English is far from their native language.

  • Need help to create a login for maintenance of a single database in a multiple databases, single instance environment

    Hi,
    We are in the process of consolidating several databases on a single instance of SQL Server 2012.
    Databases are developed by outside vendors; they have to be able to install and support their databases but they shouldn't be able to do any thing with the other databases.
    When I tried to migrate the first database, the vendor told me that on the former server he used the sa account in some batch.
    On a previous thread
    https://social.technet.microsoft.com/Forums/sqlserver/en-US/dc1f802f-d8de-4e2b-87e5-ccb289593fb7/security-for-multiple-applications-on-a-single-sql-server-2012-instance?forum=sqlsecurity
    it was suggested to me that I create a login for each vendor and that this login should map a user in their respective databases.
    To test, I simulated the process in a test database:
    1 - I create the login and I scripted the command:
    USE [master]
    GO
    /* For security reasons the login is created disabled and with a random password. */
    /****** Object:  Login [M02_Test]    Script Date: 2014-12-02 16:23:58 ******/
    CREATE LOGIN [M02_Test] WITH PASSWORD=N'ÈS^y¡¶=Å€"+y¤j|úªhÖféÎЕœEu
    c', DEFAULT_DATABASE=[M02], DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
    GO
    ALTER LOGIN [M02_Test] DISABLE
    GO
    2 - I create the user and scripted it
    USE [M02]
    GO
    /****** Object:  User [M02_Test]    Script Date: 2014-12-02 16:29:41 ******/
    CREATE USER [M02_Test] FOR LOGIN [M02_Test] WITH DEFAULT_SCHEMA=[dbo]
    GO
    Questions:
    What should we do with te scrambled password: is it saved as it was entered and should it be kept somewhere in a safe place?
    Would that do the job for the vendor who used sa before?
    Thanks for your advice

    I'm not sure why you would save the script. Why not create the login, in one way or another give the vendor the password. Keep the login disabled until needed.
    I don't recall exactly what we said last time, but it occurs to me that the application setup things on server level. Jobs is the prime thing that comes to mind, but there could be other things.
    Now, here is an important observation. As long as the vendor's application was alone on the server, that was OK, and it was OK to give the vendor sysadmin rights. In this situation this is less OK, and as we said, you should only give the vendor db_owner
    in the database.
    But the vendor will need to tell you what they do on server-level. They should know this - unless they sell their app as a "alone-on-a-server application". (And there are indeed such applications out there, even from Microsoft.) But there is a
    risk that they will bill you extra if you make their installation more difficult.
    Maybe you will have to give some vendors sysadmin for the installation, but in such case, you should ask them why they need it. If they don't, give them db_owner, and they will have to find out their hard way. (And you don't pay them for learning
    their own application.)
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Is it possible to add/create a login prompt for my website through iWeb?

    So I was tasked to create a "info" site for my family.  In an effort to keep it private from everyone except my family members I would like to create a login so that only family members can log in and view site.  Is it possible to do this through iWeb?  If so could someone help explain to me how this can be done?
    Thanks

    Its not so difficult. I host with Host Excellence and it only takes a few minutes to set up password protection using the WebShell wizard.
    Once you have done this, you can easily add and/or delete authorized users, change the password etc.
    If you use .htaccess, there are online generators to help you set it up. The main thing to remember about these files is that they are normally hidden so you need to turn on "show hidden files" in your hosting account file manager.

  • How to create a login interface in labview PDA module?

    How to create a login interface in labview PDA module? So that it checks with a list of usernames and passwords and allow to go to another VI?
    Anu

    Anu,
    I've attached a really short example that does something like what you're talking about.  It just compares the user's username and password a pre-determined username and password and then "logs the user in" based on that comparison.  Like Greycat said, you probably want to store this username and password info in some sort of file on the PDA that's in an encrypted format for both security and flexibility of your application.
    I hope this helps,
    Justin D.
    Applications Engineer
    National Instruments
    Attachments:
    LoginVI.vi ‏17 KB

  • How do you create a login page using dashcode for the iPhone's mobile safari that will transfer you to the next page?

         Hey I have created a login page in Dashcode for a mobile safari app (aka iphone web app) and I am having trouble since I can not find any useful info about multiple pages. I don't want to use a stack layout view because it is only a login page and I need to check with a database to make sure the user's login info is correct. Right now I have it set up so that it loads another iphone web app project once it validates the info.
         The only problem with this is I am having a good bit of trouble trying to pass values from my php code to javascript or html. For some reason calling the javascript inside the php code makes the actual code inside the app not be called and same with the echo statment for the html.
    So I would like to be able to create the app in this way:
    Login page > PHP > MS SQL > PHP > UNKNOWN (if I can't get the javascript or html to output both) > Secure info on the next page
         I believe It would be a lot easier if I had the option for a multiple page but instead I am having to load up an entirely new dashcode project. If anyone knows a better way please let me know. Or if anyone knows a link to good information on passing values from php to javascript, because I couldn't get any of the code I tried to work, I would really appreciate it.

    Addendum to previous reply:
    OK.  This is weird--but I should be used to that, and just grateful that it seems to work (for now).
    What I had done is FTPd some image files to my site using Filezilla, but when I had tried to access them, I was unsuccessful.  I am almost sure that I used the same url (and variations of it) as you suggested, namely,  http://mysite.verizon.net/username/filename , and it either did not work, or gave me the "Page under construction", or, in some cases asked me for my username and password.
    But, when I did it this time, it worked.  So I probably had something off, but I can now do what I want.
    By the way, if you'll permit another question, while on the site-builder site, it said that there was a "Web Photo Manager", and said that "To download the Web Photo Manager: Open the Site Builder application and go to the All My Sites page. Click on the Web Photo Manager link (listed under Advanced Building Tools )."  I can't find it--would you happen to know where it is?
    In any case, thanks a lot for all your help--it solved my problem. 

  • Create a login page that does not link to database

    Hi,
    I am really new to muse and would like to seek some help....sorry if any similar questions have been asked.
    I am making a website interface for my assignment, and i need to create a login page,
    how can i make a text box for entering the login ID and the password? and how can i add a login button?
    By the way, this does not have to link to a database, it is just  a template........so the solution using codes may not help i guess

    Hi,
    check this thread Re: Can I create a login/password protection in Muse for a HTML5 page or two?

Maybe you are looking for

  • How to update apps in a ZTE Open (with FFOS 2.0 custom build)?

    I have a ZTE Open I regularly update trough custom builds. In particular, I updated it to the 2.0 version by: BRANCH=v2.0 VARIANT=user ./config.sh inari BRANCH=v2.0 VARIANT=user ./build.sh The operation has apparently been successful, and by the test

  • Very Slow Internet + High Ping

    I am on a Sager laptop running Windows 7 and using an Airport Extreme Base Station as my router. I don't know how the router is set up or even how to access the router from my computer. My roommate set up the internet before I moved in. I have alread

  • Sending PDF as an attachment in the ABAP server proxy

    Hello All, I have a synchronous SOAP to ABAP PROXY. In the response ABAP server proxy i need to attach PDF file as an attachment. Could you please suggest any ideas of attaching PDF file as an attachment in the SERVER PROXY response. Thanks in advanc

  • Choosing different webcam in Lion's Flash Preferences (workaround?)

    I am aware of the bug the prevents clicking in the Flash Settings in OSX Lion. There is a workaround using the Flash Preferences and Allowing for a specific site, but this does not solve my issue: I need to select a different camera (or mic) in the F

  • AirPort Express -- having problems with music and stereo

    Anytime I connect iTunes to my home theater system, the sound is very very quiet, and there is a slight "buzz, or humm" noise in the background, almost as though the Line out cable isn't connected all the way (obviously it is...). This system has wor