Page 1 of 1 1
Topic Options
#159538 - 2006-03-21 01:19 PM How can I check the Domain name? Cached Credentials problem...
Mo2 Offline
Fresh Scripter

Registered: 2004-06-08
Posts: 7
Hi,

I'ld like to be able to ensure the current user / workstation is logged in the domain in the beginning of a script file... This is a script that is ran independent of the logon process, but should run only when the user is logged on.

I have tried @LDOMAIN, @LSERVER and %LOGONSERVER%. However, all of them show cached values on my windows XP, even when I'm logged in locally!

Is there a way to tell if the user / workstation is actually on the network?

I figured out I could use If Exist ("\\uncshare") as a workaround ("uncshare" is a share I know to exist on the domain). The problem is that there is a 2-3 second delay for this to compete, when the user is not on the network, and it might not be a good solution for use with many users, due to possible access issues to the shares...

What would you suggest?

Thanks

Top
#159539 - 2006-03-21 02:25 PM Re: How can I check the Domain name? Cached Credentials problem...
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
My experience has been that @Lserver would be equal to "\\"+@wksta when logged on with cached credentials.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#159540 - 2006-03-21 02:55 PM Re: How can I check the Domain name? Cached Credentials problem...
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
How is the script called? Logon scripts generally don't fire if logging in with cached creds.

@LogonMode If 1, indicates that KiXtart assumes to be running during the logon sequence
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#159541 - 2006-03-21 07:16 PM Re: How can I check the Domain name? Cached Credentials problem...
Mo2 Offline
Fresh Scripter

Registered: 2004-06-08
Posts: 7
Quote:

My experience has been that @Lserver would be equal to "\\"+@wksta when logged on with cached credentials.




Hi, Unfortunately on a couple of machines that I tested, it returns what should be cached logon server information. The value does not change for @LServer when I try it while logged in the domain or in stand alone mode.

Top
#159542 - 2006-03-21 07:23 PM Re: How can I check the Domain name? Cached Credentials problem...
Mo2 Offline
Fresh Scripter

Registered: 2004-06-08
Posts: 7
Quote:

How is the script called? Logon scripts generally don't fire if logging in with cached creds.

@LogonMode If 1, indicates that KiXtart assumes to be running during the logon sequence




Thank you. This is a script that users can run on demand or can schedule to run at a specific time. It relies on some files that are staged on a shared UNC. Naturally, if the user is not on the domain and does not have access to the UNC, I would like this script to exit gracefully, so that users do not encounter any errors...


Edited by Mo2 (2006-03-21 07:23 PM)

Top
#159543 - 2006-03-21 07:44 PM Re: How can I check the Domain name? Cached Credentials problem...
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Define stand alone mode. did you have the network cable unplugged?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#159544 - 2006-03-21 07:46 PM Re: How can I check the Domain name? Cached Credentials problem...
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
you could ping the server, use EXIST() to see if the directory exists, or a number of other similar actions to help determine what your script should do.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#159545 - 2006-03-21 07:50 PM Re: How can I check the Domain name? Cached Credentials problem...
Mo2 Offline
Fresh Scripter

Registered: 2004-06-08
Posts: 7
Quote:

Define stand alone mode. did you have the network cable unplugged?




No, actually, I was at home, trying to have the "user" experience. I was connected to my high speed provider and logged in to my PC, which used cached credentials and logged me in... However, I am not connected to any domains and have not established a VPN connection.

Top
#159546 - 2006-03-21 07:53 PM Re: How can I check the Domain name? Cached Credentials problem...
Mo2 Offline
Fresh Scripter

Registered: 2004-06-08
Posts: 7
Quote:

you could ping the server, use EXIST() to see if the directory exists, or a number of other similar actions to help determine what your script should do.




Yes, Exists() definitely works. The drawback is that, if the user is not on the domain, the scripts pauses for a few seconds, until there is a timeout. How does the ping work?

Thanks

Top
#159547 - 2006-03-21 07:59 PM Re: How can I check the Domain name? Cached Credentials problem...
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Trying searching...

http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Board=UBB12&Number=156658
_________________________
Home page: http://www.kixhelp.com/hb/

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 302 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.101 seconds in which 0.055 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org