Using VB.Net, I would like to retrieve the currently logged in user's DN
from Active Directory. Alternatively, if, using WindowsIdentity, or
something similar, I would like to get the user's full name that is found on
the Workstation Locked screen between the ( )'s.
Does anyone know how to do that? The only constraint: no use of
ActiveDS.dll permitted by the design.
Many thanks!
Derek
--
Derek Martin
593074 11 4823
Hi,
Systeminformation.username, systeminformation.userdomain,
environment.username, environment.userdomain
Ken
-------------------
"Derek Martin" <dm*****@DONTSPAMMEokstateDOT.edu> wrote in message
news:ux*************@TK2MSFTNGP10.phx.gbl...
Using VB.Net, I would like to retrieve the currently logged in user's DN
from Active Directory. Alternatively, if, using WindowsIdentity, or
something similar, I would like to get the user's full name that is found on
the Workstation Locked screen between the ( )'s.
Does anyone know how to do that? The only constraint: no use of
ActiveDS.dll permitted by the design.
Many thanks!
Derek
--
Derek Martin
593074
Thank you for your reply Ken, however, none of these appear to get me where
I need. For instance, my DN is this:
CN=Derek M. Martin,OU=support,OU=users,OU=level,DC=dc,DC=domai n,DC=com
When I lock the computer, it says: Only network\username (Derek M. Martin)
.... bla bla bla
What I need is Derek M Martin to come out.
Can you assist? Thanks again for the reply!
Derek
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:eC****************@TK2MSFTNGP15.phx.gbl... Hi,
Systeminformation.username, systeminformation.userdomain, environment.username, environment.userdomain
Ken ------------------- "Derek Martin" <dm*****@DONTSPAMMEokstateDOT.edu> wrote in message news:ux*************@TK2MSFTNGP10.phx.gbl... Using VB.Net, I would like to retrieve the currently logged in user's DN from Active Directory. Alternatively, if, using WindowsIdentity, or something similar, I would like to get the user's full name that is found on the Workstation Locked screen between the ( )'s.
Does anyone know how to do that? The only constraint: no use of ActiveDS.dll permitted by the design.
Many thanks! Derek
-- Derek Martin 593074
Does no one know how to do this??? :-(
"Derek Martin" <dm*****@DONTSPAMMEokstateDOT.edu> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl... Thank you for your reply Ken, however, none of these appear to get me where I need. For instance, my DN is this: CN=Derek M. Martin,OU=support,OU=users,OU=level,DC=dc,DC=domai n,DC=com
When I lock the computer, it says: Only network\username (Derek M. Martin) ... bla bla bla
What I need is Derek M Martin to come out.
Can you assist? Thanks again for the reply!
Derek
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message news:eC****************@TK2MSFTNGP15.phx.gbl... Hi,
Systeminformation.username, systeminformation.userdomain, environment.username, environment.userdomain
Ken ------------------- "Derek Martin" <dm*****@DONTSPAMMEokstateDOT.edu> wrote in message news:ux*************@TK2MSFTNGP10.phx.gbl... Using VB.Net, I would like to retrieve the currently logged in user's DN from Active Directory. Alternatively, if, using WindowsIdentity, or something similar, I would like to get the user's full name that is found on the Workstation Locked screen between the ( )'s.
Does anyone know how to do that? The only constraint: no use of ActiveDS.dll permitted by the design.
Many thanks! Derek
-- Derek Martin 593074
Does no one know how to do this??? :-(
"Derek Martin" <dm*****@DONTSPAMMEokstateDOT.edu> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl... Thank you for your reply Ken, however, none of these appear to get me where I need. For instance, my DN is this: CN=Derek M. Martin,OU=support,OU=users,OU=level,DC=dc,DC=domai n,DC=com
When I lock the computer, it says: Only network\username (Derek M. Martin) ... bla bla bla
What I need is Derek M Martin to come out.
Can you assist? Thanks again for the reply!
Derek
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message news:eC****************@TK2MSFTNGP15.phx.gbl... Hi,
Systeminformation.username, systeminformation.userdomain, environment.username, environment.userdomain
Ken ------------------- "Derek Martin" <dm*****@DONTSPAMMEokstateDOT.edu> wrote in message news:ux*************@TK2MSFTNGP10.phx.gbl... Using VB.Net, I would like to retrieve the currently logged in user's DN from Active Directory. Alternatively, if, using WindowsIdentity, or something similar, I would like to get the user's full name that is found on the Workstation Locked screen between the ( )'s.
Does anyone know how to do that? The only constraint: no use of ActiveDS.dll permitted by the design.
Many thanks! Derek
-- Derek Martin 593074
Derek, this is more than just your domain name. Can you put a name on this
set of information that you have listed below?
Steve
"Derek Martin" <dm*****@DONTSPAMMEokstateDOT.edu> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl... Thank you for your reply Ken, however, none of these appear to get me
where I need. For instance, my DN is this: CN=Derek M. Martin,OU=support,OU=users,OU=level,DC=dc,DC=domai n,DC=com
When I lock the computer, it says: Only network\username (Derek M. Martin) ... bla bla bla
What I need is Derek M Martin to come out.
Can you assist? Thanks again for the reply!
Derek
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message news:eC****************@TK2MSFTNGP15.phx.gbl... Hi,
Systeminformation.username, systeminformation.userdomain, environment.username, environment.userdomain
Ken ------------------- "Derek Martin" <dm*****@DONTSPAMMEokstateDOT.edu> wrote in message news:ux*************@TK2MSFTNGP10.phx.gbl... Using VB.Net, I would like to retrieve the currently logged in user's DN from Active Directory. Alternatively, if, using WindowsIdentity, or something similar, I would like to get the user's full name that is
found on the Workstation Locked screen between the ( )'s.
Does anyone know how to do that? The only constraint: no use of ActiveDS.dll permitted by the design.
Many thanks! Derek
-- Derek Martin 593074
Derek, this is more than just your domain name. Can you put a name on this
set of information that you have listed below?
Steve
"Derek Martin" <dm*****@DONTSPAMMEokstateDOT.edu> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl... Thank you for your reply Ken, however, none of these appear to get me
where I need. For instance, my DN is this: CN=Derek M. Martin,OU=support,OU=users,OU=level,DC=dc,DC=domai n,DC=com
When I lock the computer, it says: Only network\username (Derek M. Martin) ... bla bla bla
What I need is Derek M Martin to come out.
Can you assist? Thanks again for the reply!
Derek
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message news:eC****************@TK2MSFTNGP15.phx.gbl... Hi,
Systeminformation.username, systeminformation.userdomain, environment.username, environment.userdomain
Ken ------------------- "Derek Martin" <dm*****@DONTSPAMMEokstateDOT.edu> wrote in message news:ux*************@TK2MSFTNGP10.phx.gbl... Using VB.Net, I would like to retrieve the currently logged in user's DN from Active Directory. Alternatively, if, using WindowsIdentity, or something similar, I would like to get the user's full name that is
found on the Workstation Locked screen between the ( )'s.
Does anyone know how to do that? The only constraint: no use of ActiveDS.dll permitted by the design.
Many thanks! Derek
-- Derek Martin 593074
Hi Steve, this is the Distinguished Name, DN. What I ended up doing was
instead of looking for cn, I am looking at LDAP for a sAMAccountName, which
allowed me to do a search on the username instead of the DN.
So, I appear to be in good shape :-)
Thanks a bunch!
"Steve Long" <St**********@NoSpam.com> wrote in message
news:uH**************@TK2MSFTNGP10.phx.gbl... Derek, this is more than just your domain name. Can you put a name on this set of information that you have listed below?
Steve
"Derek Martin" <dm*****@DONTSPAMMEokstateDOT.edu> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl... Thank you for your reply Ken, however, none of these appear to get me where I need. For instance, my DN is this: CN=Derek M. Martin,OU=support,OU=users,OU=level,DC=dc,DC=domai n,DC=com
When I lock the computer, it says: Only network\username (Derek M. Martin) ... bla bla bla
What I need is Derek M Martin to come out.
Can you assist? Thanks again for the reply!
Derek
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message news:eC****************@TK2MSFTNGP15.phx.gbl... > Hi, > > Systeminformation.username, systeminformation.userdomain, > environment.username, environment.userdomain > > Ken > ------------------- > "Derek Martin" <dm*****@DONTSPAMMEokstateDOT.edu> wrote in message > news:ux*************@TK2MSFTNGP10.phx.gbl... > Using VB.Net, I would like to retrieve the currently logged in user's > DN > from Active Directory. Alternatively, if, using WindowsIdentity, or > something similar, I would like to get the user's full name that is found > on > the Workstation Locked screen between the ( )'s. > > Does anyone know how to do that? The only constraint: no use of > ActiveDS.dll permitted by the design. > > Many thanks! > Derek > > -- > Derek Martin > 593074 > > >
Hi Steve, this is the Distinguished Name, DN. What I ended up doing was
instead of looking for cn, I am looking at LDAP for a sAMAccountName, which
allowed me to do a search on the username instead of the DN.
So, I appear to be in good shape :-)
Thanks a bunch!
"Steve Long" <St**********@NoSpam.com> wrote in message
news:uH**************@TK2MSFTNGP10.phx.gbl... Derek, this is more than just your domain name. Can you put a name on this set of information that you have listed below?
Steve
"Derek Martin" <dm*****@DONTSPAMMEokstateDOT.edu> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl... Thank you for your reply Ken, however, none of these appear to get me where I need. For instance, my DN is this: CN=Derek M. Martin,OU=support,OU=users,OU=level,DC=dc,DC=domai n,DC=com
When I lock the computer, it says: Only network\username (Derek M. Martin) ... bla bla bla
What I need is Derek M Martin to come out.
Can you assist? Thanks again for the reply!
Derek
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message news:eC****************@TK2MSFTNGP15.phx.gbl... > Hi, > > Systeminformation.username, systeminformation.userdomain, > environment.username, environment.userdomain > > Ken > ------------------- > "Derek Martin" <dm*****@DONTSPAMMEokstateDOT.edu> wrote in message > news:ux*************@TK2MSFTNGP10.phx.gbl... > Using VB.Net, I would like to retrieve the currently logged in user's > DN > from Active Directory. Alternatively, if, using WindowsIdentity, or > something similar, I would like to get the user's full name that is found > on > the Workstation Locked screen between the ( )'s. > > Does anyone know how to do that? The only constraint: no use of > ActiveDS.dll permitted by the design. > > Many thanks! > Derek > > -- > Derek Martin > 593074 > > >
would you mind sharing with me how you are doing that? I do find the problem
interesting.
Steve
"Derek Martin" <dm*****@DONTSPAMMEokstateDOT.edu> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl... Hi Steve, this is the Distinguished Name, DN. What I ended up doing was instead of looking for cn, I am looking at LDAP for a sAMAccountName,
which allowed me to do a search on the username instead of the DN.
So, I appear to be in good shape :-)
Thanks a bunch! "Steve Long" <St**********@NoSpam.com> wrote in message news:uH**************@TK2MSFTNGP10.phx.gbl... Derek, this is more than just your domain name. Can you put a name on
this set of information that you have listed below?
Steve
"Derek Martin" <dm*****@DONTSPAMMEokstateDOT.edu> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl... Thank you for your reply Ken, however, none of these appear to get me where I need. For instance, my DN is this: CN=Derek M. Martin,OU=support,OU=users,OU=level,DC=dc,DC=domai n,DC=com
When I lock the computer, it says: Only network\username (Derek M. Martin) ... bla bla bla
What I need is Derek M Martin to come out.
Can you assist? Thanks again for the reply!
Derek
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message news:eC****************@TK2MSFTNGP15.phx.gbl... > Hi, > > Systeminformation.username, systeminformation.userdomain, > environment.username, environment.userdomain > > Ken > ------------------- > "Derek Martin" <dm*****@DONTSPAMMEokstateDOT.edu> wrote in message > news:ux*************@TK2MSFTNGP10.phx.gbl... > Using VB.Net, I would like to retrieve the currently logged in user's > DN > from Active Directory. Alternatively, if, using WindowsIdentity, or > something similar, I would like to get the user's full name that is found > on > the Workstation Locked screen between the ( )'s. > > Does anyone know how to do that? The only constraint: no use of > ActiveDS.dll permitted by the design. > > Many thanks! > Derek > > -- > Derek Martin > 593074 > > >
Hey Steve:
Basically, what I did was take about 10 examples from around the web, throw
in my own little bit and bingo it worked. Here is the code, some comments
along the way:
'Start up code:
Dim wi As WindowsIdentity = WindowsIdentity.GetCurrent
Dim logonname As String = wi.Name.ToString
Dim a As Boolean = security.checkpermissions("AD-GROUP-NAME",
logonname.Substring(3)) 'This is what group I want and what user to check
on, here, the currently logged in user
RichTextBox1.Clear()
RichTextBox1.AppendText(a.ToString)
'Calls CHECKPERMISSIONS, which is just a public exposer for the private
function
Public Shared Function checkpermissions(ByVal groupname As String, ByVal
username As String)
Dim results As Boolean = IsMember(global.groupdomain, groupname,
username)
Return results
End Function
Which calls IsMember:
Private Shared Function IsMember(ByVal strDomain As String, ByVal strGroup
As String, ByVal strMember As String) As Boolean
Try
Dim strLDAP As String = "LDAP://yourldapserverhere"
Dim m_obDirEntry As New
DirectoryEntry("GC://OU=users,OU=container,DC=domain,DC=domain,DC=com")
'This is the container root you want to start your search from
Dim srch As New DirectorySearcher(m_obDirEntry)
'This is where I have been having all my problems. strMember is
coming in as username, not DN, which is what I was originally trying to get
out. If you look at your AD setup, your users
'probably have their CN as the full name on the account, with their
actual username burried somewhere in that record, such as sAMAccountName,
which is the backwards compatable with Windows
'98 way of representing your username. Since I was searching for CN
(because I thought I had to), I was trying to get a DN out of a username and
it just wasn't working. Come to find out, I CAN
'search for something else - actually, I can search any darn thing
in there, which is nice and obvious now that I have done it...haha, so, I
switched out the expression below, which many recognize as
'the .Filter search string and stuck sAMAccountName in there instead
of CN and presto - I find the right user, now to enumerate the group
membership...
srch.Filter = "(&(objectClass=user)(sAMAccountName=" & strMember &
"))"
srch.PropertiesToLoad.Add("memberOf")
'Got this off the net someplace - kudos to the person that came up
with it. Now that I have the memberOf properties in srch (see line above),
I can build a string of JUST the group names (it originally
'comes out as one big mess, all DNs of the groups, that's not what I
want, hence the string builder...
Dim groupNames As New System.Text.StringBuilder
Dim result As SearchResult = srch.FindOne()
Dim propertyCount As Int32 = result.Properties("memberOf").Count
Dim dn As String
Dim equalsIndex As Int32, commaIndex As Int32
Dim propertyCounter As Int32
For propertyCounter = 0 To propertyCount - 1
dn = result.Properties("memberOf")(propertyCounter)
equalsIndex = dn.IndexOf("=", 1)
commaIndex = dn.IndexOf(",", 1)
If (-1 = equalsIndex) Then
groupNames.Append(dn)
Else
'This is where that magic happens, the author of this code
attaches just the group name to the end of the string and then inserts a
delimiter (could be anything almost, but a | is good)
groupNames.Append(dn.Substring((equalsIndex + 1), (commaIndex -
equalsIndex) - 1))
groupNames.Append("|")
End If
Next propertyCounter
'Now, if you look at my original calling code, you see that I really
DON'T want all of the groups, I just want to know if the group I gave it, is
in the username account of the username I gave, so it
'is really just a true or false I am looking for, so I take that
string and stick it into an array (there are other ways of doing it, I just
like this one today)
Dim ar As Array = Split(groupNames.ToString, "|")
Dim results As Boolean = False
For Each element As String In ar
If strGroup = element Then results = True
Next
'There you have it!
Return results
'Teardown stuff
m_obDirEntry.Dispose()
m_obDirEntry = Nothing
srch = Nothing
Catch ex As Exception
'Handle the exception
End Try
End Function
SO, after all that, I was finally able to take a username to an account in
AD, enumerate the groups and check if I was a member of said group. Hope
that is of some interest to you and anyone else thread watching.
:-)
Derek
"Steve Long" <St**********@NoSpam.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl... would you mind sharing with me how you are doing that? I do find the problem interesting.
Steve
"Derek Martin" <dm*****@DONTSPAMMEokstateDOT.edu> wrote in message news:%2***************@TK2MSFTNGP15.phx.gbl... Hi Steve, this is the Distinguished Name, DN. What I ended up doing was instead of looking for cn, I am looking at LDAP for a sAMAccountName, which allowed me to do a search on the username instead of the DN.
So, I appear to be in good shape :-)
Thanks a bunch! "Steve Long" <St**********@NoSpam.com> wrote in message news:uH**************@TK2MSFTNGP10.phx.gbl... > Derek, this is more than just your domain name. Can you put a name on this > set of information that you have listed below? > > Steve > > "Derek Martin" <dm*****@DONTSPAMMEokstateDOT.edu> wrote in message > news:%2****************@TK2MSFTNGP11.phx.gbl... >> Thank you for your reply Ken, however, none of these appear to get me > where >> I need. For instance, my DN is this: >> CN=Derek M. Martin,OU=support,OU=users,OU=level,DC=dc,DC=domai n,DC=com >> >> When I lock the computer, it says: Only network\username (Derek M. >> Martin) >> ... bla bla bla >> >> What I need is Derek M Martin to come out. >> >> Can you assist? Thanks again for the reply! >> >> Derek >> >> >> "Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message >> news:eC****************@TK2MSFTNGP15.phx.gbl... >> > Hi, >> > >> > Systeminformation.username, systeminformation.userdomain, >> > environment.username, environment.userdomain >> > >> > Ken >> > ------------------- >> > "Derek Martin" <dm*****@DONTSPAMMEokstateDOT.edu> wrote in message >> > news:ux*************@TK2MSFTNGP10.phx.gbl... >> > Using VB.Net, I would like to retrieve the currently logged in >> > user's >> > DN >> > from Active Directory. Alternatively, if, using WindowsIdentity, or >> > something similar, I would like to get the user's full name that is > found >> > on >> > the Workstation Locked screen between the ( )'s. >> > >> > Does anyone know how to do that? The only constraint: no use of >> > ActiveDS.dll permitted by the design. >> > >> > Many thanks! >> > Derek >> > >> > -- >> > Derek Martin >> > 593074 >> > >> > >> > >> >> > >
Thanks much Derek. It is definitely of interest to me.
Steve
"Derek Martin" <dm*****@DONTSPAMMEokstateDOT.edu> wrote in message
news:O7**************@TK2MSFTNGP09.phx.gbl... Hey Steve:
Basically, what I did was take about 10 examples from around the web,
throw in my own little bit and bingo it worked. Here is the code, some comments along the way:
'Start up code: Dim wi As WindowsIdentity = WindowsIdentity.GetCurrent Dim logonname As String = wi.Name.ToString Dim a As Boolean = security.checkpermissions("AD-GROUP-NAME", logonname.Substring(3)) 'This is what group I want and what user to check on, here, the currently logged in user RichTextBox1.Clear() RichTextBox1.AppendText(a.ToString)
'Calls CHECKPERMISSIONS, which is just a public exposer for the private function Public Shared Function checkpermissions(ByVal groupname As String, ByVal username As String) Dim results As Boolean = IsMember(global.groupdomain, groupname, username) Return results End Function
Which calls IsMember: Private Shared Function IsMember(ByVal strDomain As String, ByVal strGroup As String, ByVal strMember As String) As Boolean Try Dim strLDAP As String = "LDAP://yourldapserverhere" Dim m_obDirEntry As New DirectoryEntry("GC://OU=users,OU=container,DC=domain,DC=domain,DC=com") 'This is the container root you want to start your search from Dim srch As New DirectorySearcher(m_obDirEntry)
'This is where I have been having all my problems. strMember is coming in as username, not DN, which is what I was originally trying to
get out. If you look at your AD setup, your users 'probably have their CN as the full name on the account, with
their actual username burried somewhere in that record, such as sAMAccountName, which is the backwards compatable with Windows '98 way of representing your username. Since I was searching for
CN (because I thought I had to), I was trying to get a DN out of a username
and it just wasn't working. Come to find out, I CAN 'search for something else - actually, I can search any darn thing in there, which is nice and obvious now that I have done it...haha, so, I switched out the expression below, which many recognize as 'the .Filter search string and stuck sAMAccountName in there
instead of CN and presto - I find the right user, now to enumerate the group membership...
srch.Filter = "(&(objectClass=user)(sAMAccountName=" & strMember & "))"
srch.PropertiesToLoad.Add("memberOf")
'Got this off the net someplace - kudos to the person that came up with it. Now that I have the memberOf properties in srch (see line
above), I can build a string of JUST the group names (it originally 'comes out as one big mess, all DNs of the groups, that's not what
I want, hence the string builder...
Dim groupNames As New System.Text.StringBuilder Dim result As SearchResult = srch.FindOne() Dim propertyCount As Int32 = result.Properties("memberOf").Count Dim dn As String Dim equalsIndex As Int32, commaIndex As Int32 Dim propertyCounter As Int32 For propertyCounter = 0 To propertyCount - 1 dn = result.Properties("memberOf")(propertyCounter) equalsIndex = dn.IndexOf("=", 1) commaIndex = dn.IndexOf(",", 1) If (-1 = equalsIndex) Then groupNames.Append(dn) Else 'This is where that magic happens, the author of this code attaches just the group name to the end of the string and then inserts a delimiter (could be anything almost, but a | is good) groupNames.Append(dn.Substring((equalsIndex + 1),
(commaIndex - equalsIndex) - 1)) groupNames.Append("|") End If Next propertyCounter
'Now, if you look at my original calling code, you see that I
really DON'T want all of the groups, I just want to know if the group I gave it,
is in the username account of the username I gave, so it 'is really just a true or false I am looking for, so I take that string and stick it into an array (there are other ways of doing it, I
just like this one today)
Dim ar As Array = Split(groupNames.ToString, "|") Dim results As Boolean = False For Each element As String In ar If strGroup = element Then results = True Next
'There you have it! Return results
'Teardown stuff m_obDirEntry.Dispose() m_obDirEntry = Nothing srch = Nothing Catch ex As Exception 'Handle the exception End Try End Function
SO, after all that, I was finally able to take a username to an account in AD, enumerate the groups and check if I was a member of said group. Hope that is of some interest to you and anyone else thread watching.
:-)
Derek
"Steve Long" <St**********@NoSpam.com> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl... would you mind sharing with me how you are doing that? I do find the problem interesting.
Steve
"Derek Martin" <dm*****@DONTSPAMMEokstateDOT.edu> wrote in message news:%2***************@TK2MSFTNGP15.phx.gbl... Hi Steve, this is the Distinguished Name, DN. What I ended up doing
was instead of looking for cn, I am looking at LDAP for a sAMAccountName, which allowed me to do a search on the username instead of the DN.
So, I appear to be in good shape :-)
Thanks a bunch! "Steve Long" <St**********@NoSpam.com> wrote in message news:uH**************@TK2MSFTNGP10.phx.gbl... > Derek, this is more than just your domain name. Can you put a name on this > set of information that you have listed below? > > Steve > > "Derek Martin" <dm*****@DONTSPAMMEokstateDOT.edu> wrote in message > news:%2****************@TK2MSFTNGP11.phx.gbl... >> Thank you for your reply Ken, however, none of these appear to get
me > where >> I need. For instance, my DN is this: >> CN=Derek M.
Martin,OU=support,OU=users,OU=level,DC=dc,DC=domai n,DC=com >> >> When I lock the computer, it says: Only network\username (Derek M. >> Martin) >> ... bla bla bla >> >> What I need is Derek M Martin to come out. >> >> Can you assist? Thanks again for the reply! >> >> Derek >> >> >> "Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message >> news:eC****************@TK2MSFTNGP15.phx.gbl... >> > Hi, >> > >> > Systeminformation.username, systeminformation.userdomain, >> > environment.username, environment.userdomain >> > >> > Ken >> > ------------------- >> > "Derek Martin" <dm*****@DONTSPAMMEokstateDOT.edu> wrote in message >> > news:ux*************@TK2MSFTNGP10.phx.gbl... >> > Using VB.Net, I would like to retrieve the currently logged in >> > user's >> > DN >> > from Active Directory. Alternatively, if, using WindowsIdentity,
or >> > something similar, I would like to get the user's full name that
is > found >> > on >> > the Workstation Locked screen between the ( )'s. >> > >> > Does anyone know how to do that? The only constraint: no use of >> > ActiveDS.dll permitted by the design. >> > >> > Many thanks! >> > Derek >> > >> > -- >> > Derek Martin >> > 593074 >> > >> > >> > >> >> > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Chefry |
last post by:
I'm trying to set up an off the shelf script and keep getting an error.
My host set up the mysql on my site and I changed the variables I had to in the
settings.php file but I keep getting the...
|
by: Oleg Shnayderman |
last post by:
Hi All,
I am very new to C# as well as to SQL. I need to write an application which
is connecting to SQL DB and getting all the user's tables and after create a
dataset for all the tables in the...
|
by: Rod |
last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some
reason, opening some ASP.NET applications we wrote is producing the
following error message:
"The Web server reported...
|
by: Nick |
last post by:
I'm developing an intranet app, and want to get the current user name for
logging purposes. I've turned off anonymous access, and turned on windows
authentication in the IIS config. The apps...
|
by: dei3cmix |
last post by:
Hey, I am having a problem with a program I am working on. Basically,
the first part of the program gets input from a file using cin.getline.
Then the second part, (still in the same main as the...
|
by: MSK |
last post by:
Hi,
Continued to my earlier post regaring "Breakpoints are not getting hit"
, I have comeup with more input this time.. Kindly give me some idea.
I am a newbie to .NET, recently I installed...
|
by: Erik |
last post by:
Why isn't my update method getting called?
Pasted below is an aspx from a 1.1 application I'm working on. It has
two textboxes and a button for inserting data into the database, and a
datagrid...
|
by: JamesB |
last post by:
I am writing a service that monitors when a particular app is started.
Works, but I need to get the user who is currently logged in, and of course
Environment.UserName returns the service logon...
|
by: Michael Howes |
last post by:
I'm writing a utility to manage a machines *local* accounts in c#
I am getting all the users in a specific Group just fine but when I
want to get some of the information on each user from their...
|
by: tshad |
last post by:
I have a file that I converted from VB.Net to C# that works fine in VB.Net
when I compile but not in C# using the same libraries.
The error I am getting is:
PageInit.cs(9,7): error CS0138: A...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |