Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Implementing a custom login app?

Implementing a custom login app?
Thread Tools
TimmyDee51
Mac Elite
Join Date: Mar 2000
Location: Cambridge
Status: Offline
Reply With Quote
Feb 18, 2004, 06:35 PM
 
I'm the Mac specialist for a small college and I've been working on a login app that will mount a users network volume and a few other shares. I already have the app written in AppleScript Studio and it works as advertised. What I need to do now is figure out a way to insert it into the login process so that it runs before the Finder and the Dock can be accessed (due to security concerns). Once the user authenticates properly, the app quits and my hope is that it will dump the user into the Finder.

This is how I envision the login process to work:

1. Student logs into the local machine as "Student". This is a restricted account with no password so it's a one-click process. (So you know, it's a perfectly secure setup, so no worries on the lack of a password.)

2. The custom login app pops up and asks for the student's username and password. Once entered, the app will mount the shares. It then checks for the shares. If they are present, the app will quit automatically.

3. At this point and this point only would I like the Finder and the Dock to launch/become visible/become usable.

4. The student logs out via the Apple Menu to end their session.

Does anyone know any tricks to get the login app running before the Finder and suspend the Finder's launch until proper authentication? If not, is there a way I can hide the Finder and the Dock (both visually and through command-Tab) until authentication? Thanks in advance.
Per Square Mile | A blog about density
     
Art Vandelay
Professional Poster
Join Date: Sep 2002
Location: New York, NY
Status: Offline
Reply With Quote
Feb 18, 2004, 06:58 PM
 
See http://www.bombich.com/software/lwm.html. It shows how to setup a login and logoff hooks and provides a gui tool for doing it. However, I don't understand why you're doing things the way you are. Why not just have the students log into the Mac with their account to begin with. The system will automatically mount their network folder and you eliminate double logins.
Vandelay Industries
     
TimmyDee51  (op)
Mac Elite
Join Date: Mar 2000
Location: Cambridge
Status: Offline
Reply With Quote
Feb 18, 2004, 08:07 PM
 
We run a Novell server for authentication and getting the login to work via LDAP is nothing short of pulling teeth. We did it on a test box and once we did get it up and running, OS X places a ton of files into the users home directory, which in this case is the user's network space. We don't have room in each of those directories for all the caches, preferences, etc. Additionally, this only allows us to auto-mount only one share, not the four we would like. Setting up methods to link the files to local copies would be more work than it's worth.

The problem with Bombich's software (at least as far as I can see) is that it only runs shell scripts. We need a fully-blown app to run. If anyone has ways that we can run a shell script that will temporarily stall/disable the Dock and Finder in addition to launching an app, please let me know.
Per Square Mile | A blog about density
     
Millennium
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Feb 18, 2004, 08:18 PM
 
Originally posted by TimmyDee51:
The problem with Bombich's software (at least as far as I can see) is that it only runs shell scripts. We need a fully-blown app to run. If anyone has ways that we can run a shell script that will temporarily stall/disable the Dock and Finder in addition to launching an app, please let me know.
Couldn't you wrap the app inside a shell script (calling it with open or a similar Terminal command) and then use Bombich's software to call that?
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
Art Vandelay
Professional Poster
Join Date: Sep 2002
Location: New York, NY
Status: Offline
Reply With Quote
Feb 18, 2004, 09:14 PM
 
You can still use LDAP for authentication and use local home directories instead of network ones. You can also set multiple mounts in LDAP or via Workgroup Manager.

You can try calling your app from a shell script, but don't use 'open' since it immediately continues the script. Just call your application directly. That should hold the script until it exits, therefore blocking the Finder and Dock.
Vandelay Industries
     
TimmyDee51  (op)
Mac Elite
Join Date: Mar 2000
Location: Cambridge
Status: Offline
Reply With Quote
Feb 18, 2004, 09:15 PM
 
Yes, I suppose I could. I'm not sure why I didn't think of that before. Unfortunately, that still leaves me with the problem of cutting access to the Dock and the Finder until the user authenticates. I can see Bombich's program launching the login app and then OS X with it's wonderful multi-tasking loading the rest of the OS in the background. (Probably the one time I've been mad at the progress Mac OS has made ) Any ideas there?

Edit: Art, how would all that LDAP/local directories/multiple mounts work? Do you have a site or documentation of your own I can see? If so, that would be a huge help.
Per Square Mile | A blog about density
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 01:11 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,