linuxmuster / linuxmuster-linuxclient7

The new approach on connecting linuxclients to the Linuxmuster.net v7 Active Directory server.
3 stars 5 forks source link

Improve offline login #30

Closed PLanB2008 closed 2 years ago

PLanB2008 commented 3 years ago

When trying to login via a remote machine you get an error message saying sysvol is not mounted.

grafik

This makes sense for computers always connected to the network but confuses user using a notebook at home.

I don't think the error message is a big bummer but maybe we can change this to a warning or find an even better solution.

This is a really low priority topic.

dorianim commented 3 years ago

I think it would be a good Idea to have a global offline detection. This would improvve such things.

What would be the best criteria to determine if a client is offline or in a different network? May be check if we can get a kerberos ticket? But this could also mean that the domain join is simply not working.

PLanB2008 commented 3 years ago

I don't know.

I think we would've to check several things:

kerberos ticket, ping to server nmap server (special ports)

and calculate a score which determines if were simply not connected or have a problem with the domain join. Well... at least this is what sophomorix would probably do 🥇 :)

Maybe we could combine this with a configuration flag which would "allow" a computer to be offline. So we could skip this procedure on desktop clients which should always be connected to the network and notebooks which are not.

dorianim commented 3 years ago

I think neither pinging, nor nmaping would make a lot of sense, since it wouldn't tell us, if the client is broken of if it is in a difderent network with a server which has the same IP and runs a samba.

Maybe it would be sufficient to go to offline mode if no kerberos ticket can be pulled. Because it donsen't matter what the cause is - there will be no shares and printers available.

dorianim commented 3 years ago

Pulling the kerberos ticket has to be done anyways, so we dont need to implement a setting for this check. In the logon, we could use klist to ckeck if a kerberos ticket is available.

dorianim commented 3 years ago

I think I will implement it like this and export LINUXMUSTER_LINUXCLIENT7_OFFLINE_MODE in this case. We could akso show a nice popuo message informing the user about this in the onSessionStarted hook.

PLanB2008 commented 2 years ago

I just figured out offline login is kind of pointless at the moment. When trying to login without connection the client takes about three minutes till it runs in a timeout and and proceeds with login.

I started fiddling around a little by checking for Port 445 for networkConfig["serverHostname"] during the mount of the shares which boiled down the waiting time to about one minute.

I'm not sure what causes this waiting time.

dorianim commented 2 years ago

did you login with a cached user?

PLanB2008 commented 2 years ago

I did.

dorianim commented 2 years ago

Strange... Could you try to log in on a text tty? Over there, you might be able to see where exactly it gets stuck.

hermanntoast commented 2 years ago

Running on text tty I got the following output (cached user, offline mode): Peek 2022-01-17 14-22

with the same user on gui tty (cached user, offline mode) the same result as @PLanB2008: Peek 2022-01-17 14-23

I hope it help!

Regards, Lukas

dorianim commented 2 years ago

This is expected, because the ldap is not available. But where does it get stuck?

PLanB2008 commented 2 years ago

Okay it seems like this problem was solved by itself.