• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

OSX Login Screen

Shr00m

n00b
Joined
Jun 14, 2005
Messages
20
I'm not a OSX user so I don't know the detailed workings on how the login process works. I need to find a way to automatically display a 'user agreement' when somebody logs into osx.

I have it setup right now through active directory as a windows policy and it works great. I know there isn't a way to use this policy on OSX so I'm going to settle for something that I can setup on the local machine.

Its hard to search for this since I don't know all of the OSX terms.

Anyone have any ideas?
 
there is a simply way todo it. there may be another way but this will get u started.


make a text file. drag it to the dock. right click on it, and "open at startup."

now if the user is in limited mode, im pretty sure they cant remove stuff from the dock? if they do, i dont know whatll happen, whether itll still open.


thisll get u started though. someone else will chime in later im sure
 
you don't need it in the dock to open it at start-up. You will need to lock the file so it can't be written to, otherwise the first time someone logs in they could delete the contents and just an empty file would pop-up.

Personally I would write a small app that would do it, giving them an "I agree" button or a "Do Not Agree" button, if they clicked the "Do Not Agree" button it would log them out. :D

I'm willing to bet you could do it in only a few minutes with X-Code. Watch a few tutorials and start making your program :p
 
something like the following should work. you need to add it as a loginhook.

Code:
#!/bin/bash
echo "`cat /location/of/term/and/agreement.txt`" > /tmp/authrules
osascript -e "tell application \"Finder\"" -e "activate" -e "display dialog (do shell script \"cat /tmp/authrules\") buttons {\"Decline\",\"Accept\"} default button 2" -e "end tell" > /tmp/button
rules=`(cat /tmp/authbutton)`
if [ "$rules" == "button returned:Decline" ]; then
killall WindowServer
fi

save the above as login.sh or something like that and do the following in the command line
Code:
sudo defaults write com.apple.loginwindow LoginHook /location/of/script/login.sh

that above needs to be run in the account that will need to be authorized. also, the location of the agreement text file needs to be somewhere the user can access such as /Users/Shared just make sure they dont have write privleges to it.

Basically, what the script does is display the agreement and they can accept or decline it. If they decline it it will log them out. FYI, i have used this script, but I did not write it. I am pretty sure it was Michael Bombich, but I cant remember it.
 
Back
Top