Obtaining Windows user name via apex

Hi All,
I have a few apps in apex that are used by multiple users. I am trying to find a way to obtain the windows login / username for anyone who executes a procedure via apex.
I have done some searching and created the process below to insert the username when the main process are executed, however this only gives me the apex login, which is generic across all users.
Does anyone know how i can get the actual users username please.
DECLARE
c owa_cookie.cookie;
BEGIN
c := owa_cookie.get('LOGIN_USERNAME_COOKIE');
c.vals(1);
insert into TABLE (username)
VALUES c.vals(1)
END;
Thanks in advance.
G

Hello,
Take a look at the following links, which give you all you need -
http://jastraub.blogspot.com/2008/03/ntlm-http-authentication-and.html
Error ERR-7621 when using NTLM Page Sentry Function
Note it requires some work on your part, but the topic is discussed extensively in those two links.
Hope this helps,
John.
Blog: http://jes.blogs.shellprompt.net
Work: http://www.apex-evangelists.com
Author of Pro Application Express: http://tinyurl.com/3gu7cd
REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

Similar Messages

  • Get current logged in Windows user name

    Hi
    Is it possible to retrieve the current logged in Windows user name into a text field automatically?
    Thank you in advance for the help.

    Hi,
    This is a security issue and you will need a javascript file in the Acrobat folder. This will contain a trusted function allowing access to the login name.
    Here is a thread that looked at this:
    http://forums.adobe.com/message/2198084#2198084
    However read to the end, because if you are Reader Enabling the form (at least through Acrobat) then you may run into problems.
    Good luck,
    Niall

  • Unable to get Windows User Name using Oracle Forms 6i, Jinitiator 1.3.1.17

    Hi,
    Requirement: Get Windows User Name using Oracle Web Forms 6i.
    Tools Using: Windows NT, Oracle web forms 6i, Oracle 10g DB.
    Description: I am using GetClientInfo JBean from otn.oracle.com, which gets windows user name, IP address and machine name. The demo I got from oracle web site uses Jinitiator version 1.1.7.18. While we are using the latest version Jinitiator 1.3.1.17. Due to this reason, I am unable to use Javakey which comes with older version but doesn't come with newer version, that's why I can't create the new JavaBean Java identity (PJC).
    Please advise what to do. All environment variables are set everything is done, this is the only thing bothering me.
    I went through the article 202768.1 from metalink, but on step 5, it gives an error keytool error: java.lang.Exception: Input not an X.509 Certificate.
    Also, please let me know if there is any other workaround for this requirement.
    Thanks & Best Regards,
    Mo

    Hi,
    Thanks for your kind reply. Actually there was a problem in creating a certificate, now it is okay with the same method. Certificate got imported on client and everything is ready.
    Now, the problem is when I try to set Bean Area Implementation Class property with oracle.forms.demos.GetClientInfo, it gives an error FRM-13008 Cannot find JavaBean with name 'oracle.forms.demos.GetClientInfo'.
    I went through the articles 1072329.6, 196824.1, and set ClassPath and Path variables with proper values. Also, I have copied jar file and signature file in forms60/java folder. I don't see any problems. Please let me know what I am doing wrong. My limitation is that I have to do all this in forms6i.
    I searched forums on metalink and found out that someone installed Patch 15, and everything went okay for him. Do you think I should install Patch 15? if YES, how will I do it, I mean should I first uninstall my forms and then install patch15 or install the patch on my forms?
    Thanks so much for your help.
    Thanks & Best Regards,
    Mo

  • Getting the NT user name (Windows user name)

    Hello,
    I am trying to get the windows user name in ABAP program but
    I can not find any useful function.
    Thanks in advance,
    Eitan Iluzz.

    you can use the following code to get the windows logged on user
    data: username type string .
    CALL METHOD cl_gui_frontend_services=>get_user_name
      CHANGING
        user_name            = username
      EXCEPTIONS
        CNTL_ERROR           = 1
        ERROR_NO_GUI         = 2
        NOT_SUPPORTED_BY_GUI = 3
        others               = 4 .
        CALL METHOD cl_gui_cfw=>flush
          EXCEPTIONS
            CNTL_SYSTEM_ERROR = 1
            CNTL_ERROR        = 2
            others            = 3 .

  • To know windows user name and machine name

    Is it possible to automatically populating windows user name and machine name in form field?
    If so what should I do?

    Hi,
    You can, but it is considered a security risk by Adobe. Therefore you need to execute the script in a "trusted function". This is script in a JavaScript file that is stored in a set folder on the user's computer. This can make it difficult to maintain, as all users will need this .js file.
    Also if you Reader Enable the form through Accrobat, then the script will fail.
    See a thread here with examples: http://forums.adobe.com/message/2189021#2189021.
    Good luck,
    Niall

  • How to get the CLIENT OS USER NAME using Apex

    Dear All,
    I know there are many other posts (some of them are very old) discuss about this issue. But unfortunately most of the posts endup with NO PROPER ANSWER. But still I believe that tehre has to be some way to do this. So this is my requirement.
    I am using custom authentication module and I want to get the CLIENT MACHINE OS USER NAME for that. But I do not want to do any authentication against the client user domain.
    How can I get this?
    * There are some other way to get this using VB Scripts. But thats not a real solution for this due to followings
    01. User has to manually allow to run VB scripts. So if user dissable that then we canot get the required info
    02. Its working only with specific browsers(Mainly in IE and also we can get that thing work after installing plugins to Firefox.). So this is also depends with the bvrowser and plugings.
    What I want to do is to get this info using a common way which is not depends with the browser or any thirdparty plugins.
    Thanks,
    Alex

    Its good that you did some searching in the forums before you posted the question.
    Most modern browsers would consider what you require as a security/privacy issue and prevents such information from being transmitted available(easily). IE might let you pull out this using a VB script or activex control. Browser specific addons/extension could work but they need some kind of installation to start with. Java could be a way to do it with all browsers, but the end user still has to grant access before it can do any such thing.
    Lets say you were able to pull out such information from an end user, what would be next, get his mail id from outlook ? , access his browsing history, steal credit card information or read cookies?
    Add to that , what if the end user accesses it using any other OS(linux,macintosh or even a smartphone) ? what about windows vista and windows 7 OS's , are you going to write code to handle all those cases too ?
    Here's a blog posting which explains using NTLM authentication with Apex(it still needs configuration from the end user)
    What I want to do is to get this info using a common way which is not depends with the browser or any thirdparty plugins.I guess if this is the question, then the answer would have to be no. I don't think you will be able to find a method that passes this information from the client side without any modification/configuration at their side

  • Changing long user name via UNIX?

    Is there a simple way to change a user's LONG name via UNIX (or some other method that doesn't involve System Prefs --> Accounts).
    We're migrating from AD to local accounts and currently, the long names are: +Lastname, Firstname (my company domain yadda, yadda)+ and I'd like that to be simple +First Last+ after the switch. I can fetch the name using (system info) in an Applescript, but I can't figure out how to change it that way, either.

    Use the dscl command.

  • Windows User Name

    I am looking how can i get user name of windows means that i want to know who is login on the system and accessing my JSP page .. suppose guest is login on the machine i get the username : GUEST i need it urgent plz help me

    hey.. u
    who ever you are.. thankx for the links...
    i found the stuffs ver useful and interesting
    was kind of wondering that i was not able to make ou the response header fron the authenticate header..
    now i gotto know it is 2 times challenge...
    http://www.innovation.ch/java/ntlm.html
    http://free.tagish.net/
    http://www.luigidragone.com/networking/ntlm.html
    i implemented and checked.. this code.. am able to get the users info and the host and the lan manager response...
    now i gotto find a way to check this agains that AD server.. i gusee will be able to achive this also..
    bte, can you throe some light on the logout of this,.
    http rfc says logout in basic auth is not that mature... so we gotto forece close the browser.. is logout possible in NTLM ?
    now i got

  • Two windows user names, one library

    Does anyone have any idea how to combat this issue? My wife and I both have seperate user names on our computer. Therefore we each have seperate iTunes library files. I have managed to get our shared music library in the "Public" folder so that we do not have duplicate songs on the computer. However, the problem arises with the iTunes library files. When I use iTunes it accesses my library file and when she uses iTunes it accesses her library. That means that if I add songs to my library, the song files will be stored in our shared "public" folder, but her library file will not know about them (they are part of MY library) and therefore she will not see that we have them available. Is there any way to get iTunes to access the public iTunes library file so that we can avoid this situation? Thanks.

    You and the Mrs. would have to connect your iTunes Libraries to the same .itl file.
    Have a look at this article in the Apple Knowledge Base for details on how to do so.
    Not that this will mean you have identical Libraries: identical contents, identical playlists, identical ratings, identical comments, etc.

  • Windows user name question -- can I change it?

    My daughter opened my laptop and initialized it with her name thinking it was her Thinkpad that was delivered (we ordered at same time from different places).  So, I was able to change the account name on the welcome screen and the start menu via the control panel.  I also changed the password.
    Here's the problem:  In Windows Exporer, when I view the file structure for the C:\ drive, I still see my daughter's name as the primary user folder under:  Computer / Windows7_OS (C / Users / DAUGHTER'S NAME / My Documents.  So even though I changed the account name over to my name and changed the password, my daughter's name is still in the directory path to My Documents.
    How can I fix this?  If I delete this user and set up a new user will this mess up the computer?  My sense is that bad things will happen as this was the name that the Thinkpad was initialized with....  Thanks! 

    Hi,
    please follow instructions on this link
    i would suggest you backup your data first,
    to be safe.
    http://www.sevenforums.com/tutorials/147545-user-p​rofile-folder-change-user-account-folder-name.html

  • Getting current windows user name

    Hi all,
    In my BSP application, i would like to fetch the current windows logged in username. I did it using
    Active X Controls. If i ActiveX Objects, i need to change my browser settings. Which i don't want to do.
    Could you tell me anyother way doing it using JAVASCRIPT or VBSCRIPT or anything.
    Regards,
    Ravi Varma

    Halo Durairaj,
    I have seen your answer in the mentioned posting.We are getting a problem if we try the code which you have mentioned in the posting. The problem is that, we need to change security setting of the web browser. Otherwise, the solution is not working. We need to change the setting, because the solution which you have provided works based on ActiveX Controls. Is there any other way, to do the same in BSP?
    Thanks & regards,
    Ravi varma

  • Get Windows domain name and user through jsp

    I have a jsp page that will be viewed through ie on windows platform, that is a member of domain.
    I need to get the domain name and logged in windows user name to use it in my page.
    I've looked through similar topics. Found no answer.
    1.
    System.parameter("user.name") is not ok. it returns user that runs jvm.
    2.
    import com.sun.security.auth.module.NTSystem;
    NTSystem system = new NTSystem();
    system.getDomain()
    system.getName()that didn't work through jsp, though the answer is correct.
    3. I found some api at http://www.sinotar.com/download/swin/doc/index.html
    it did the right thing, but it's not free.
    Could anyone advice me smth?
    I've looked

    well, it won't work in your jsp because jsps run server-side
    could try putting an applet on your page that does it, but I wouldn't be surprised if the security manager put the kibosh on that, too
    a third - but clunky - way would be to write a quick java app that does it, and launch it through WebStart. bit ugly, and needs extra user input they might not want to do

  • Caml query - get current user name

    I have an external list via BDC (so cannot change column type, create calculated column or workflow
    ). There is a text column “Supervisor”. I need to create a view that display all items which the value of “Supervisor” = current login user’s display name or login name (windows user name). 
    I tried set up the field on the UI with [Me] function which does not work because “Supervisor” is not an user/group type column. Now I am working on the code. I found the follow caml query on the web that is close to what I need:
    <Eq>
    <FieldRef Name='Supervisor' LookupId='TRUE'/>
    <Value Type='Integer'><UserID/></Value>
    </Eq>
    I know this only work if the ‘Supervisor’ type is “User”. I just wonder if someone know how to replace the <Value> with a text string
    of the current user’s display name or window name? I really appreciate for any help (I have struggled with this issue for a week).
    Forget to mention that I am working on a web part page in SharePoint designer, not in Visual Studio. So I cannot not using spcontext class.

    Thank you again for your response.  For this method, I need need to find a way to get the current user to a variable, the use the varrible in the query. This works for me:
    <ParameterBinding Name="UserID" Location="CAMLVariable;ServerVariable(LOGON_USER)" DefaultValue="CurrentUserName"/>
    <Eq>
    <FieldRef Name="Supervisor"/>
    <Value Type="Text">{UserID}</Value>
                    </Eq>
                    <Eq>
    <FieldRef Name="AttnMonitor"/>
    <Value Type="Text">{UserID}</Value>
                   </Eq>

  • Scan string for computer user name

    Good morning NI Forums,
    I need direction on a file path scan. I'm trying to get to the user name on any system, primarily XP or 7. I'd like to compare the user name from the "Get System Directory" VI with a constant user name.This way I can pass that to a case structure and close LabVIEW if the computer is logged into the wrong user (there are network read/write permissions which is why I need to control where the program isrun from). Any suggestions for the format string constant or maybe a better mouse trap?
    I've attached my VI for reference.
    Thanks!
    Tyler C. | Certified LabVIEW Associate Developer
    Solved!
    Go to Solution.
    Attachments:
    Check Computer Name.vi ‏12 KB

    I don't have LV2011.
    Have you seen this Knowledgebase article?
    Programmatically Retrieving a Windows User Name in LabVIEW
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • WD Abap - get system (windows) user

    hi folks,
    is it possible to get the system user (e.g. windows user) when running a webdynpro abap application?
    kind regards,
    oliver

    Hi Martin,
    The system only allows someone to access oss tickets of their own company. Heidi was referring to the oss ticket, Oliver had created.
    Anyway, the response was that web browsers don't transmit the windows user name for security reasons. In general, the windows user name should not be trusted and should not be used for authentication purposes inside of a SAP system. Nonetheless, using Single Sign On, there might be a slim chance to develop something that connects a SAP user with a windows user.
    Best regards,
    Thomas

Maybe you are looking for