Results 1 to 4 of 4

Thread: How to prevent user from login before the Ethernet is fully established?

  1. #1
    Join Date
    Aug 2010
    Beans
    21

    How to prevent user from login before the Ethernet is fully established?

    Hi guys,

    I have a customized Ubuntu system (based on a 64bits 13.10 release) which is configured to accept users on a ldap server and mount their home drive from afs. Everything is working except after a fresh boot, if the a user attempts to login before the wired connection icon changes to "connected", there is a good chance to crash the session for that user.

    I wonder if there is anyway to make the login box appear after the Ethernet connection is fully established?

    Thanks in advance!

  2. #2
    Join Date
    Jul 2013
    Location
    Wisconsin
    Beans
    3,307

    Re: How to prevent user from login before the Ethernet is fully established?

    Sure, one way is to add an Upstart condition.
    The login screen is owned by lightdm.
    Lightdm's start criteria is in /etc/init/lightdm.conf:
    Code:
    start on ((filesystem
               and runlevel [!06]
               and started dbus
               and plymouth-ready)
              or runlevel PREVLEVEL=S)
    Add a stanza to the logic for network (let's assume eth0):

    Code:
    start on ((filesystem
               and runlevel [!06]
               and started dbus
               and plymouth-ready
               and net-device-up IFACE=eth0)
              or (runlevel PREVLEVEL=S
               and net-device-up IFACE=eth0))


    Warning: I have not tested it.
    Last edited by ian-weisser; January 16th, 2014 at 06:47 PM.

  3. #3
    Join Date
    Feb 2007
    Location
    Romania
    Beans
    Hidden!

    Re: How to prevent user from login before the Ethernet is fully established?

    You should create a .override file instead of editing directly the .conf file. See: http://upstart.ubuntu.com/cookbook/
    Last edited by sisco311; January 16th, 2014 at 01:41 PM.

  4. #4
    Join Date
    Jul 2013
    Location
    Wisconsin
    Beans
    3,307

    Re: How to prevent user from login before the Ethernet is fully established?

    Excellent point! Quite right.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •