Systemd with wpa_supplicant 802.1X wired and dhcpcd - Need help

Hi,
At work we use 802.1X wired authentication on the network to get access. If successfully authenticated then I get 10.x.x.x network address from DHCP,
and if not successfully authenticated, I get a 172.x.x.x address from DHCP.
Now I've configured wpa_supplicant with certificates in its configuration file so that one is working fine.
What I have problems with is the startup, this is what I need in order:
* I need wpa_supplicant to start up
* wpa_supplicant needs to authenticate completely
* now dhcpcd may run and I should get 10.x.x.x address.
I've tried two (b*ttfugly) ways of solving this under systemd:
wpa_auth.service
[Unit]
Description=WPA 802.1X
Requires=sys-subsystem-net-devices-eth0.device
After=sys-subsystem-net-devices-eth0.device
[Service]
Type=simple
ExecStart=/usr/sbin//wpa_supplicant -ieth0 -Dwired -c/etc/wpa_supplicant/wpa_supplicant.conf
[Install]
Alias=multi-user.target.wants/wpa_auth.service
And in [email protected] I've added:
After=wpa_auth.service
However this won't work since wpa_supplicant isn't done authenticating when dhcpcd starts up.
I've also tried using -B option to wpa_supplicant and forking in wpa_auth.service like this:
Type=forking
ExecStart=/usr/sbin//wpa_supplicant -B -ieth0 -Dwired -c/etc/wpa_supplicant/wpa_supplicant.conf
Now if I'm lucky this works, but it's still a race condition.
So: Next things I've tried is to make the wpa_auth.service start up a script (Type=forking) that executes wpa_supplicant, and adds a sleep 1, this gives wpa_supplicant 1 second to authenticate, but its still a shitty and unsafe solution.
Last solution I tried was using the above solution but replaced sleep with wpa_cli -a script that according to man page executes the script when it recieves an event. So right now the chain looks like this:
In chronological order:
- wpa_auth.service (systemd)
Type=forking
- script
- wpa_supplicant
- wpa_cli -a script2 (will block until recieving an CONNECTED/DISCONNECTED event from wpa_supplicant, then run script2)
- script2
-pkill wpa_cli
- exit 0
done - dhcpcd may start
I just want to find a way to start dhcpcd after wpa_supplicant has authenticated so I get a correct IP address.
How do I do this in a correct way? Can I use dbus somehow to make wpa_supplicant signal that it is done authenticating?
Thanks
Last edited by dimman (2012-11-23 15:56:01)

From the sample wpa_supplicant.conf:
# scan_ssid:
# 0 = do not scan this SSID with specific Probe Request frames (default)
# 1 = scan with SSID-specific Probe Request frames (this can be used to
# find APs that do not accept broadcast SSID or use multiple SSIDs;
# this will add latency to scanning, so enable this only when needed)
So... looks like that likely isn't the solution. Of course, this is all just speculation now, until I can resolve the hardware issues or get a new laptop.

Similar Messages

  • I currnently own a Macintosh computer with Creative Suite Master collection and I need help

    I own a Macintosh computer with Creative Suite master collection and I just recently bought a Windows 8 computer that I want to use Creative Suite on also, I do not want to buy a brand new product as I have proof of ownership on my Creative Suite, is there ANY way I can get around buying a new product? I own the item for Mac I just want it for windows also, any answers will be appreciated!

    It depends. If it's a CS6 suite you can apply for a platform change to Windows free of charge, but you terminate your Mac license.
    CS5, you would pay an upgrade fee and be able to change the license.
    CS4 and below... you have no options other than buying a Full Windows version of CS6.

  • I have an existing new belkin modem router which works fine with quite a few wired and wireless products in my house. My question is if i buy a time capsule can i put it in another room and wirelessly connect it to the belkin modem router, I would then ju

    I have an existing new belkin modem router which works fine with quiet a few wired and wireless products in my house. My question is if i buy a time capsule can i put it in another room and wirelessly connect it to the belkin modem router, I would then just like my macbook pro and (imac future purchase) to wirelessly back up to it???????????

    Your will need to perform a Factory Default Reset on the TIme Capsule to clear out the current network settings and then reconfigure it to "join" your wireless network using the AirPort Utility setup application.
    To perform the Factory Default Reset on the Time Capsule....
    Pull the power cord from the back of the device
    Wait a few moments
    Hold in the reset button on the back of the Time Capsule and keep holding it an additional 8-10 seconds while you simultaneously plug the power cord back in to the Time Capsule
    Release the reset button after the hold period and allow 25-30 seconds for the Time Capsule to restart to a slow, blinking amber light
    On your Mac.....
    Open Macintosh HD > Applications > Utilities > AirPort Utility
    Click Continue
    Follow the guided setup and choose the "join" option when it appears duriing the setup
    You will need to know the exact type of wireless security that the Belkin router is using to enter this information during the setup of the Belkin. Otherwise, the Time Capsule cannot join the network, and you will receive an error message after the configuration process.

  • When I try to install iTunes 10.5, it says, "There is a problem with this Windows Installer package.  A program run as part of the setup did not finish as expected.  Contact your support personnel or package vendor."  I have Windows XP and I need help.

    5, it says, "There is a problem with this Windows Installer package.  A program run as part of the setup did not finish as expected.  Contact your support personnel or package vendor."  I have Windows XP and I need help.

    After reading all these posts, one by one did not resolve my problem until I got the very end.  Regardless of what step would resolve your problem, these are the steps I would recomment to everyone for a what seems to be a safe and fool-proof upgrade to iTunes 10.5.
    1. Stand alone upgrade to the latest Quicktime version
    2. Go to control panel and "change" then select repair to the following applications in the order specified by the post on Oct 27. (Notice I skipped Quicktime because it had been upgrade manually,and Bonjour did not have a "repair" option)
    iTunes; Apple Software Update: Mobile Device Support; Apple Applications Support
    Some of these applications may not appear if they do not apply to your configuration (no iPhone, or no iPad, or other apple devices).
    Once all updated, I did not need to restart nor launch any applications, I simply went straight into the 10.5 upgrade, and where it normally got stuck, this time the installation continued for a while longer until it completed successfully.
    Great work everyone who contributed!  Thank you very much!

  • I have tried everything I know to retrieve the iPhoto Library app.  I detest this new Photo app, which obviously wasn't designed with photographers in mind.  I desperately need help in retrieving the old app and have not been able to do it so far.

    I have tried everything I know to retrieve the iPhoto Library app.  I detest this new Photo app, which obviously wasn't designed with photographers in mind.  I desperately need help in retrieving the old app and have not been able to do it so far.  I have gone to my app folder and tried to update my iPhoto Library.  I have gone to my trash and brought it over to my desktop and still cannot use it.  Please help!

    Try this fix discovered by User photosb189:
    From Finder, hold down the option key on your keyboard and click on the Go menu at the top of the screen
    Select Library from the drop down menu
    Then navigate to Application Support > iLifeAssetManagement > assets
    Right click on the 'sub' folder and choose Compress
    Drag the resulting zip file to your Desktop (as a backup)
    Go to your System Preferences and choose iCloud
    Turn OFF the iCloud Photos option
    Go back to Library > Application Support and DELETE the iLifeAssetManagement folder
    Now, in System Preferences, turn the iCloud Photos option ON
    iPhoto should now be able to launch. Give it enough time to re-download your Photo Stream content. if you are missing any of your My Photo Stream photos (more than 30 days old), unzip the sub folder on your desktop and drag that into iPhoto.

  • HT3702 So I accidentally purchased 20,000 coins from hanging with friends for $99.00 and I need to cancel that purchase. How do I do that

    So I accidentally purchased 20,000 coins from hanging with friends for $99.00 and I need to cancel that purchase. How do I do that

    Welcome to Apple Communities
    Contact with iTunes, but probably Apple won't refund you

  • Firefox is not campatible with F5 Networks Host Plugin and I need it to run a remote website

    Firefox is not compatible with F5 Networks Host Plugin and I need it to run a remote website

    Do these hotfixes help you? http://support.f5.com/kb/en-us/solutions/public/12000/700/sol12757.html

  • My new iPhone 4s and my iPad 1 have the same problem: While working on one of them, the screen goes black and the right back to home screen. I've tried resetting the iPad with no chages to this problem. Need help, this is anoying.

    My new iPhone 4s and my iPad 1 have the same problem: While working on one of them, the screen goes black and the right back to home screen. I've tried resetting the iPad with no chages to this problem. Need help, this is anoying.

    I just did a reset all settings on both.
    Will see where this gets me.
    Thank you for your helpfull input.

  • I'm new to SQL Server Integration Services and I need help on how to begin learning SSIS. Is there any training for it besides msdn?

    I'm new to SQL Server Integration Services and I need help on how to begin learning SSIS. Is there any training for it besides msdn?

    Check this thread where people have already given their suggestion on learning SSIS
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/f2cc1cf3-204d-454a-a189-47df87a3aa23/i-want-to-learn-ssis?forum=sqlintegrationservices
    I would suggest to go for You tube videos (type learn SSIS or begin SSIS step by step) you will get lot of good tutorials to start with.
    Happy Learning!!
    If this post answers your query, please click "Mark As Answer" or "Vote as Helpful".

  • I have a PC and a need help to configure my external hard disk on my network. Thanks

    I have a PC and a need help to configure my external hard disk on my network. Thanks

    If you mean you wish to plug a USB drive into the Airport Extreme router (or TC not express) that is easy..
    The disk must be formatted FAT32.. as if.. stay away from FAT .. or HFS+ ie Mac OS extended Journaled.
    Format the disk on a Mac is best.. and even use GUID partition scheme not MBR.
    The PC has no issue writing and reading files because this is a network drive.. The PC does not write to the drive.. it writes files to the Airport OS which writes and reads the disk and passes the info using standard windows SMB.. To the windows computer it will be a Windows NT server.. FAT32 setup.
    If your setup is different.. to my hugely guessed assumptions.. give details.. always helps to have.. make and model.
    Make and model of disk.. make and model of router.. how the setup will be done.. what windows OS you run.. etc etc.
    As it stands your question could have nothing to do with apple at all.. other than you posted in a forum so I guess there is something apple in there somewhere.

  • I'm trying to reinstall Logic Pro 9, and it says It's already installed. I have a project due for class and I need help asap. Please help!!!

    I'm trying to reinstall Logic Pro 9, and it says It's already installed. I have a project due for class and I need help asap. Please help!!!

    Yea I am. I deleted Logic Pro 9 and moved the App to the Trashcan like normal. Then when I go to install it, it says its already Installed. When I do this with other apps; it works fine, the install thing comes back up like it should once you have deleted the app

  • My daughters IPod was stolen and I need help trying to locate it?

    And I dont know how to do this and really need help

    - If you previously turned on FIndMyiPod on the iPod in Settings>iCloud and wifi is on and connected go to iCloud: Find My iPhone, sign in and go to FIndMyiPhone. If the iPod has been restored it will never show up.
    - You can also wipe/erase the iPod and have the iPod play a sound via iCloud.
    - If not shown, then you will have to use the old fashioned way, like if you lost a wallet or purse.
    - Change the passwords for all accounts used on the iPod and report to police
    - There is no way to prevent someone from restoring the iPod (it erases it) using it.
    - Apple will do nothing without a court order                         
    Reporting a lost or stolen Apple product                                        
    - iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number

  • In testing 9 and X, "Compare Docs" we have a critical issue and really need help!

    For years we have used Acrobat 7 to do PDF compares and we love it!  However, the company recently advised we must upgrade to 9 and then eventually to X.  In testing 9 and X, Compare Docs we have a critical issue and really need help.  Our PDFs are produced by IT in a batch process and one of our main, critical functions is to compare previous PDFs to current PDFs;  however, in using 9 the Compare screen automatically sets the Doc Description for our PDFs to "Scanned Doc" and does not produce any differences! If you try to change the setting to Reports --it totally shuts down both documents without running!  Version 7 runs the compare of the same PDFs  beautifully, pointing out all the differences, as usual!  Has this every happen to anyone?  Do you know what we can do to our PDFs to allow version 9 to do the compare and produce results?  Why is 9 treating these non-scanned PDF docs as such?  Thanks so much for any help or insight you can give me on this issue! 

    (Moved the discussion to the correct forum)

  • My old iMac and OS 10.4 will not accept the New iTunes Version 10 application and I can't get past the screen offering to download iTunes 10.  This is wrong and I need help getting past this situation. Help!

    My old iMac and OS 10.4 will not accept the New iTunes Version 10 application and I can't get past the screen offering to download iTunes 10.  This is wrong and I need help getting past this situation. Help!

    Sure, you can get around it if you don't need the newest version of iTunes. I still use version 7.5 because the newer versions didn't strike me as offering anything I needed.
    If you do need a version 10-something then you will have to upgrade your operating system to Leopard (fi your computer will support it) at least.  If you need 10.5 for some reason then there's no getting around it, you will have to buy a new computer.

  • This morning i tried to restore my ipod and it said:"the ipod "ipod cannot be restored at this time because the ipod software update server could not be contacted or is temporarily unavalible." i have no idea what to do and i need help

    this morning i tried to restore my ipod and it said:"the ipod "ipod cannot be restored at this time because the ipod software update server could not be contacted or is temporarily unavalible." i have no idea what to do and i need help.

    Update Server
    Try:
    - Powering off and then back on your router.
    - iTunes for Windows: iTunes cannot contact the iPhone, iPad, or iPod software update server
    - Change the DNS to either Google's or Open DNS servers
    Public DNS — Google Developers
    OpenDNS IP Addresses
    - For one user uninstalling/reinstalling iTunes resolved the problem
    - Try on another computer/network
    - Wait if it is an Apple problem

Maybe you are looking for

  • Modify contents in a table

    Hi all, I have a table 'tab' with some records and this table 'tab' has two keys. I want to read a particular record with the two keys(I have these two key values). This record has a field unit of measure which is always 'L' and I want to overwrite U

  • How to improve jdbc 4 connection and Transact-SQL

    I am using a jdbc 4 connection to connect to Database. With code Class.forName("org.postgresql.Driver"); String url = "jdbc:msql://athens.imaginary.com:4333/db_web"; username = �mycon�; password = �mycon�; Connection  conn = DriverManager.getConnecti

  • IDOC_INPUT_ORDER - How manage the custom error message ?

    Hello, on EXIT_SAPLVEDA_002 and EXIT_SAPLVEDA_003 I done some custom check, (I would show some custom message as a result of these check). My question is: How to show these custom message on the standardc idoc spool (WE02) ?? There's DERRTAB internal

  • My ipod 5 series is not showing airplay - it is connected to the correct wifi

    Can anybody help - my iPod touch is not showing the airplay icon.  It is connected to the correct wifi

  • Closing the window

    Hello all, Thanks to those who helped before to get the dialog box to open. (I'd never used Swing before, so I ended up learning quite a bit<g>) At any rate, I've run into another silly snag, I can't get the app window to close. I've tried the dispos