Re: Case difference between NT and XP when using GetUserName API
From: Roger Abell (mvpNOSpam_at_asu.edu)
Date: 07/05/04
- Next message: anonymous_at_discussions.microsoft.com: "NavScan32.exe not Norton"
- Previous message: Roger Abell: "Re: Encrypting files on a CD"
- In reply to: Chris Goffin: "Case difference between NT and XP when using GetUserName API"
- Next in thread: Chris Goffin: "Re: Case difference between NT and XP when using GetUserName API"
- Reply: Chris Goffin: "Re: Case difference between NT and XP when using GetUserName API"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sun, 4 Jul 2004 21:24:18 -0700
After you have the loginname, use such as Wmi to obtain
the samName property of the user object. Why is it so?
Who knows, but the samName is the downlevel name, not
the primary name in uplevel Windows versions and as far
as I know NetBIOS is not case sensitive so I would guess
these differences were not considered worth the overhead.
-- Roger Abell Microsoft MVP (Windows Server System: Security) MCSE (W2k3,W2k,Nt4) MCDBA "Chris Goffin" <ChrisGoffin@discussions.microsoft.com> wrote in message news:9273ACD2-6375-4229-ADAE-A45E48023590@microsoft.com... > As part of a migration from NT to XP for 5000+ PCs, I have come across an issue where the case returned by XP for the logged on user is different to under NT. > If you use the username property of the wscript.network object or use the GetUsername API the case is returned as the samAccountName with the case preserved on NT but on XP the username is returned exactly as it was entered at the login screen. > That is to say, if the user logs into XP by typing in USERx for the username then WSH and the API call will return USERx whereas NT returns UserX(as it appears in the samAccountName). > This is causing issues for some applications which are attempting to authenticate to Unix hosts where the username is case-sensitive. > Can anybody: > 1) Explain why this occurs > 2) Provide a solution that will make these calls return the samAccountName under XP >
- Next message: anonymous_at_discussions.microsoft.com: "NavScan32.exe not Norton"
- Previous message: Roger Abell: "Re: Encrypting files on a CD"
- In reply to: Chris Goffin: "Case difference between NT and XP when using GetUserName API"
- Next in thread: Chris Goffin: "Re: Case difference between NT and XP when using GetUserName API"
- Reply: Chris Goffin: "Re: Case difference between NT and XP when using GetUserName API"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|