473,881 Members | 1,704 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting the user's DN

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
Nov 21 '05 #1
11 4873
Hi,

Systeminformati on.username, systeminformati on.userdomain,
environment.use rname, environment.use rdomain

Ken
-------------------
"Derek Martin" <dm*****@DONTSP AMMEokstateDOT. edu> wrote in message
news:ux******** *****@TK2MSFTNG P10.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

Nov 21 '05 #2
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=suppo rt,OU=users,OU= level,DC=dc,DC= domain,DC=com

When I lock the computer, it says: Only network\usernam e (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***@bellsout h.net> wrote in message
news:eC******** ********@TK2MSF TNGP15.phx.gbl. ..
Hi,

Systeminformati on.username, systeminformati on.userdomain,
environment.use rname, environment.use rdomain

Ken
-------------------
"Derek Martin" <dm*****@DONTSP AMMEokstateDOT. edu> wrote in message
news:ux******** *****@TK2MSFTNG P10.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

Nov 21 '05 #3
Does no one know how to do this??? :-(
"Derek Martin" <dm*****@DONTSP AMMEokstateDOT. edu> wrote in message
news:%2******** ********@TK2MSF TNGP11.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=suppo rt,OU=users,OU= level,DC=dc,DC= domain,DC=com

When I lock the computer, it says: Only network\usernam e (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***@bellsout h.net> wrote in message
news:eC******** ********@TK2MSF TNGP15.phx.gbl. ..
Hi,

Systeminformati on.username, systeminformati on.userdomain,
environment.use rname, environment.use rdomain

Ken
-------------------
"Derek Martin" <dm*****@DONTSP AMMEokstateDOT. edu> wrote in message
news:ux******** *****@TK2MSFTNG P10.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


Nov 21 '05 #4
Does no one know how to do this??? :-(
"Derek Martin" <dm*****@DONTSP AMMEokstateDOT. edu> wrote in message
news:%2******** ********@TK2MSF TNGP11.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=suppo rt,OU=users,OU= level,DC=dc,DC= domain,DC=com

When I lock the computer, it says: Only network\usernam e (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***@bellsout h.net> wrote in message
news:eC******** ********@TK2MSF TNGP15.phx.gbl. ..
Hi,

Systeminformati on.username, systeminformati on.userdomain,
environment.use rname, environment.use rdomain

Ken
-------------------
"Derek Martin" <dm*****@DONTSP AMMEokstateDOT. edu> wrote in message
news:ux******** *****@TK2MSFTNG P10.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


Nov 21 '05 #5
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*****@DONTSP AMMEokstateDOT. edu> wrote in message
news:%2******** ********@TK2MSF TNGP11.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=suppo rt,OU=users,OU= level,DC=dc,DC= domain,DC=com

When I lock the computer, it says: Only network\usernam e (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***@bellsout h.net> wrote in message
news:eC******** ********@TK2MSF TNGP15.phx.gbl. ..
Hi,

Systeminformati on.username, systeminformati on.userdomain,
environment.use rname, environment.use rdomain

Ken
-------------------
"Derek Martin" <dm*****@DONTSP AMMEokstateDOT. edu> wrote in message
news:ux******** *****@TK2MSFTNG P10.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


Nov 21 '05 #6
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*****@DONTSP AMMEokstateDOT. edu> wrote in message
news:%2******** ********@TK2MSF TNGP11.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=suppo rt,OU=users,OU= level,DC=dc,DC= domain,DC=com

When I lock the computer, it says: Only network\usernam e (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***@bellsout h.net> wrote in message
news:eC******** ********@TK2MSF TNGP15.phx.gbl. ..
Hi,

Systeminformati on.username, systeminformati on.userdomain,
environment.use rname, environment.use rdomain

Ken
-------------------
"Derek Martin" <dm*****@DONTSP AMMEokstateDOT. edu> wrote in message
news:ux******** *****@TK2MSFTNG P10.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


Nov 21 '05 #7
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**********@N oSpam.com> wrote in message
news:uH******** ******@TK2MSFTN GP10.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*****@DONTSP AMMEokstateDOT. edu> wrote in message
news:%2******** ********@TK2MSF TNGP11.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=suppo rt,OU=users,OU= level,DC=dc,DC= domain,DC=com

When I lock the computer, it says: Only network\usernam e (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***@bellsout h.net> wrote in message
news:eC******** ********@TK2MSF TNGP15.phx.gbl. ..
> Hi,
>
> Systeminformati on.username, systeminformati on.userdomain,
> environment.use rname, environment.use rdomain
>
> Ken
> -------------------
> "Derek Martin" <dm*****@DONTSP AMMEokstateDOT. edu> wrote in message
> news:ux******** *****@TK2MSFTNG P10.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
>
>
>



Nov 21 '05 #8
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**********@N oSpam.com> wrote in message
news:uH******** ******@TK2MSFTN GP10.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*****@DONTSP AMMEokstateDOT. edu> wrote in message
news:%2******** ********@TK2MSF TNGP11.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=suppo rt,OU=users,OU= level,DC=dc,DC= domain,DC=com

When I lock the computer, it says: Only network\usernam e (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***@bellsout h.net> wrote in message
news:eC******** ********@TK2MSF TNGP15.phx.gbl. ..
> Hi,
>
> Systeminformati on.username, systeminformati on.userdomain,
> environment.use rname, environment.use rdomain
>
> Ken
> -------------------
> "Derek Martin" <dm*****@DONTSP AMMEokstateDOT. edu> wrote in message
> news:ux******** *****@TK2MSFTNG P10.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
>
>
>



Nov 21 '05 #9
would you mind sharing with me how you are doing that? I do find the problem
interesting.

Steve

"Derek Martin" <dm*****@DONTSP AMMEokstateDOT. edu> wrote in message
news:%2******** *******@TK2MSFT NGP15.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**********@N oSpam.com> wrote in message
news:uH******** ******@TK2MSFTN GP10.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*****@DONTSP AMMEokstateDOT. edu> wrote in message
news:%2******** ********@TK2MSF TNGP11.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=suppo rt,OU=users,OU= level,DC=dc,DC= domain,DC=com

When I lock the computer, it says: Only network\usernam e (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***@bellsout h.net> wrote in message
news:eC******** ********@TK2MSF TNGP15.phx.gbl. ..
> Hi,
>
> Systeminformati on.username, systeminformati on.userdomain,
> environment.use rname, environment.use rdomain
>
> Ken
> -------------------
> "Derek Martin" <dm*****@DONTSP AMMEokstateDOT. edu> wrote in message
> news:ux******** *****@TK2MSFTNG P10.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
>
>
>



Nov 21 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2714
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 following errors Warning: mysql_pconnect(): Access denied for user: 'ODBC@localhost' (Using password: NO) in f:\wwwroot\professionalchef\Back\JobsOnline\mysql.php on line 121 Warning: mysql_pconnect(): Access denied for user: 'ODBC@localhost'...
1
3924
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 database and create an XML document with all the info. The problem is, that I can do this if I know the table name. However, what if I don't know the table name nor I know how many user's tables in the particular database.
8
10030
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 the following error when attempting to create or open the Web project located at the following URL: 'http://localhost/WebApplication1'. 'HTTP/1.1 500 Internal Server Error'."
4
5975
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 web.config file has authentication mode set to windows, and 'identity impersonate' is set to true. When I try and get the default.aspx page, IE returns an error page with an 'Access is denied.' error. (Even if I try direct from the webserver, logged...
3
3708
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 first part) needs to get input from the user, and I want to do this with cin.getline also. The problem I am getting, is when I run the program, the text if read in from the file correctly, but it seems to just skip over the cin.getline when I want...
2
4225
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 .NET. I could not debug using breakpoints, breakpoints are not getting hit, but the application is working fine with out any issue.
0
1768
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 for editing and deleting data. When a user clicks on the "Edit" button in the datagrid, Edit() method is called and the appropriate row is changed into textboxes. And if user clicks on the "Update" button, the Update() method is fired. But if...
33
11885
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 (NT_AUTHORITY\SYSTEM). I understand that when the service starts, no user may be logged in, but that's ok, as the app I am monitoring can only be run by a logged in user. Do I need to use WMI to get the user context of Explorer.exe or is there a...
5
13225
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 Properties collection I can't get the properties on some users. For example, I get all the users that are part of my machines Administrators Group. I get get the properties of the built in local Administrator account and some local IT account,...
3
9580
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 using namespace directive can only be applied to namespaces; 'System.Web.HttpCookie' is a class not a namespace The code is:
0
11095
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10812
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10399
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9552
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7952
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5780
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5976
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4597
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.