Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a problem with Ubuntu 12.04 when I trying to integrate with Active Directory.

I installed CentrifyDC and i joind the DC. Everything is ok until I reboot my computer and when I try to login with username and domain password I can't do it.Then I log in with my default ubuntu username and if i try command adinfo appears centrifydc in diconnectd mode. After 3 minutes without any interventions when I type adinfo command centryfidc appears connected and I can login with my domain user and pass.

Same thing is if I execute command: /etc/init.d/centrifydc restart it appear connected.

Can anyone tell me why it can't connect at the boot ? Error when I type: adinfo --diag is: Cannot find SPNs: unable to bind to DC.

share|improve this question

Finally, problem resolved by making a script in /etc/network/if-up.d/

sudo vim /etc/network/if-up.d/centrify

with content:


if [ "$IFACE" = lo ]; then
        exit 0 

/etc/init.d/centrifydc restart
initctl emit centrify-connected

after I typed:

sudo chown root /etc/network/if-up.d/centrify
sudo chgrp root /etc/network/if-up.d/centrify
sudo chmod 755 /etc/network/if-up.d/centrify

And then I modified /etc/init/lightdm.conf with right permissions (chown root, chgrp root, chmod 644), and I added only one boot condition.

sudo chown root /etc/init/lightdm.conf 
sudo chgrp root /etc/init/lightdm.conf 
sudo chmod 644 /etc/init/lightdm.conf 


sudo vim /etc/init/lightdm.conf 

and I added only one boot condition.

# LightDM - light Display Manager
# The display manager service manages the X servers running on the
# system, providing login and auto-login services
# based on gdm upstart script

description "LightDM Display Manager"
author      "Robert Ancell <>"

start on ((filesystem
           and runlevel [!06]
           and started dbus
           and (drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1
                or stopped udev-fallback-graphics)
           **and centrify-connected)**
          or runlevel PREVLEVEL=S)

stop on runlevel [016]

emits login-session-start
emits desktop-session-start
emits desktop-shutdown

    if [ -n "$UPSTART_EVENTS" ]
        # Check kernel command-line for inhibitors, unless we are being called
        # manually
        for ARG in $(cat /proc/cmdline); do
            if [ "$ARG" = "text" ]; then
        plymouth quit || : 
        exit 0

    [ ! -f /etc/X11/default-display-manager -o "$(cat /etc/X11/default-display-manager 2>/dev/null)" = "/usr/bin/lightdm" -o "$(cat /etc/X11/default-display-manager 2>/dev/null)" = "/usr/sbin/lightdm" ] || { stop; exit 0; }

    if [ "$RUNLEVEL" = S -o "$RUNLEVEL" = 1 ]
        # Single-user mode
        plymouth quit || :
        exit 0

    exec lightdm
end script

post-stop script
    if [ "$UPSTART_STOP_EVENTS" = runlevel ]; then
        initctl emit desktop-shutdown
end script

Be very careful when you do this !

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.