This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

can't access root when AD is down

woow .... this night was exceptional !!

- for shot version GOTO 'SHORT'
- for the long version keep reading

here is my story...
I have been using Sophos UTM (Astaro ASG) for years at work and have never been into a problem that took more than 30 min to fix ...

lately I wanted to use the home license on a my on box at home (I have quite a big network at home, I am the network admin of the whole building [:)] ) 
this is when I started experimenting with all possible features of the UTM I attached to my home domain with active directory and started using it to authenticate users, I updated the windows server that has a AD and something went wrong so I had to take it down .... I noticed I can't get to the UTM webadmin page so I thought there is a problem with the interfaces, I connected a monitor and a keyboard ..... tried to login the root account but told me the password is wrong..... reset the password ( booting using init=/bin/bash) and still says the password is wrong when I reboot normally into the console !!!

I tried many times to reset the password for root and loginuser but eachtime it says the password is still wrong .... I noticed that the prompt goes from 
login:

to 

 login:

after it fails to log me in the first time

-SHORT

so I think the UTM is still trying to authenticate using the active directory .... now I am locked out from webadmin and can't reset root or loginuser ..... how to tell the UTM not to lookup useres from AD (that is down) ?

if this is not possible then please tell me how to get a copy of the configuration backup so that I can load it up after a clean reinstall ?


This thread was automatically locked due to age.
  • Hi,
    use your boot trick to get into the console, then see Restoring a Backup from Command Line

    You can also do a factory reset from the console, but copy your backups off first.

    more info at
    https://community.sophos.com/products/unified-threat-management/astaroorg/f/114/t/72230

    There's probably a 'cc' command to disable AD authentication, but I don't know what it is.

    You can also do a password reset from the console, but it won't disable AD:
    https://community.sophos.com/products/unified-threat-management/astaroorg/f/51/t/21716


    Barry
  • thanks BarryG for the quick reply

    I can't access root loginuser !!
    I reset the password but when I reboot .... and use the new password it says it is wrong .... so I can't even use "cc" !!
  • It's never a good idea to limit WebAdmin access to externally-authenticated users; you aren't the first person to get trapped by this, nor will you be the last!

    It sounds like you'll need some linux knowledge to boot onto a USB stick and mount the hard drive to be able to use the article above to copy off some backups.  I always try to get permission from my clients to add my RSA key for SSH access to root so that I'm not dependant on loginuser and root passwords in an emergency.

    Cheers - Bob
  • It's never a good idea to limit WebAdmin access to externally-authenticated users; you aren't the first person to get trapped by this, nor will you be the last!

    It sounds like you'll need some linux knowledge to boot onto a USB stick and mount the hard drive to be able to use the article above to copy off some backups.  I always try to get permission from my clients to add my RSA key for SSH access to root so that I'm not dependant on loginuser and root passwords in an emergency.

    Cheers - Bob


    You can actually boot into rescue mode and change root without needing an external media... I don't have that information handy on my phone once I get home I will post how to do that
  • Thanks all for contributing, in today's IT world there is nothing better than a giving back community [:)]

    It's never a good idea to limit WebAdmin access to externally-authenticated users; you aren't the first person to get trapped by this, nor will you be the last!

    It sounds like you'll need some linux knowledge to boot onto a USB stick and mount the hard drive to be able to use the article above to copy off some backups.  I always try to get permission from my clients to add my RSA key for SSH access to root so that I'm not dependant on loginuser and root passwords in an emergency.

    Cheers - Bob


    I reached to the same conclusion the hard way and thanks for your reply Bob.

    I managed eventually to solve my problem, and to give back to the community I'll explain in another separate post.
  • did you boot into rescue mode and use the passwd reset command?
  • Update - problem solved .... yaaay [[:)]]

    my main goal is to solve the problem in a way that will preserve the details configurations I have made through the time.

    I had no backups on my email (I decided not to set the UTM to send them to me as I have an already crammed inbox and I didn't give it much importance, this proved to be a bad decision).

    I couldn't login to the root account no matter how many times I changed the password because apparently it always look for the password at the AD (which is down), although when you come to think of it it actually shouldn't retrieve everybody's password from AD at least not the root !!

    I had to use this guide   
    Recover access to your Sophos UTM in the event of password loss

    but when I finished step 10 I had to fork into my own solutions as steps 11 and the rest are not helping in my situation.

    so after step 10 I added another user .... another root user ...... using this command

    # useradd -u 0 -o -g 0 -G 0,1,2,3,6,10 -M root2
    and then 
    # passwd root2 
    to set the password

    then I rebooted to the normal console

    this time I logged into root2 which ( I guess haven't been authenticated by the AD so the UTM nows -somehow- to not look it up from there and authenticate it locally)

    this time I managed to login .... with root privileges, which means I can use CC ....
    but still I didn't want to reset the system .... I wanted to keep the configurations ... I learnt the the configurations are backed up in this path
    /var/confd/var/storage/snapshots
    but they are not saved in a format that allows the load them from the webadmin ... in fact they will give a "file corrupted" ..... another search lead me to this post 

    https://community.sophos.com/products/unified-threat-management/astaroorg/f/51/t/20762

    by Jack Daniel (thanks Jack if you are reading this) .... I managed to backup to a good backup (before I linked the UTM to the AD)

    I hope this helps someone .... WARNING .... don't use this guide on a commercial license as it will void your official support.

    I know it is not the optimal solution there is .... but it might help [[:)]] thanks all ....
  • did you boot into rescue mode and use the passwd reset command?


    yes .... but still this didn't help .... it still looks up the passwords from AD !!
  • it shouldn't.  I have my webadmin logins hooked into AD but i can still use my own root password and loginguser password.  I think your machine has had someone tinkering inside the shell and screwed something up or you have some corruption somewhere.
  • it shouldn't.  I have my webadmin logins hooked into AD but i can still use my own root password and loginguser password.  I think your machine has had someone tinkering inside the shell and screwed something up or you have some corruption somewhere.


    I can't rule this out .... but I don't remember doing such a thing neither