Script file on Apple Mac Welcome Screen

I would like to create a script which runs on Mac Bootup and enables wifi connections. at the welcome screen and if possible connects the user to a Network Location depending on assigned IP Address Range. Is this possible?

Were really having issues at the moment as Mobile Accounts are not working for us

James WilkinsonNetwork Security AnalystAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Eoin OSullivanConsultantCommented:
The short answer is NO.  Connecting to WiFi and network location prior to login is not a feature of OSX.  By default WiFi is not enabled in terms of login and authentication until you login.

The longer answer is that it is possible to enable WiFi on bootup with a bit of Unix knowledge and core system modification but it is not for the faint-hearted.

See the posting here on the Apple website by 'essd' which explains how to create a plist file to enable WiFi and pre-login to a specified network
there is also a clever way to use the iPhone configuration utility to create a deployment profile which can be used for computers to pre-login to a certain network

There are some AppleScripts that can mount certain network drives at login .. but to detect the IP range and then selectively mount certain network shares is a good bit more complex.

This piece of AppleScript will search for a specific IP and if it gets a response it will mount the volume - it does require you either hardcode the username and password or enable guest access to each network share.
set IP_Address to ""
tell application "Finder"
set P_Result to (do shell script "ping -c 1 -q " & IP_Address)
if "100% packet loss" is not in P_Result then
mount volume "smb://"
end if
end try
end tell

Open in new window

James WilkinsonNetwork Security AnalystAuthor Commented:
We found our issue. The Root user was not enabled n the Directory Utility

When Binding the Mac to AD or OD using the Directory Utility click Tools and select enable Root User and set a password.

Once we enabled this things became reliable and all the welcome screen blips stopped. We employed an Apple Specialist to highlight our issues and this is the first thing he picked up on

Hope this helps someone else that may be in our position

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
James WilkinsonNetwork Security AnalystAuthor Commented:
Working Solution
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apple OS

From novice to tech pro — start learning today.