Login user name of working PC.

Hi all,
I want to find the login name (or user name) of the working computer. So try this.
        com.sun.security.auth.module.NTSystem NTSystemUser = new
            com.sun.security.auth.module.NTSystem();
        NTSystemUser.getName();getName() gives the user name. But I'm not sure weather this is work on UNIX, Mac and so on. On windows it is working fine, because NTSystem always gives the system informations.
One thing to I have say, to test this code I don't have a Linux system. All the things done on just referring the Java documentation and this is the only way I found.
Anybody can help me to correct my code, if it is wrong.
Thanks.

ItsJava wrote:
Interesting, if Java is platform independent why such a classes are used.Just because its core is platform independent doesn't mean you can't do platform specific things with it.
So many people were screaming for years that they wanted Windows specific stuff that Sun caved in and created it, and of course now people (in some cases the same people, go figure) complain that Sun did that.
Anyway, as they documentation clearly mentions, you should NEVER use any classes in the com.sun packages directly.

Similar Messages

  • How to save the Created by name instead of saving  login user name

    Hi All,
    I done Without log in Jsp page to open one responsibility without login .
    here created one column Created by here user can view list of values in username . it EAM module work request page .
    my issue is while creating the work request Created by name saving in to the database but requirement is user needs to select using created by LOV that username needs to be save on data base .
    once open the application created by name is coming as a login name using controller i removed the created by i set the created by name in PR is lovevent .
    front end its working fine but while saving login user name is saving i need to save the created by name based on the lov .
    can any one help to overcome this issue......
    Thanks in Advance.....
    Kumar

    Hi,
    Thanks For Reply
    It is a Standard Page and created by column Passing in the package while inserting the data FND_GLOBAL.UserID.
    I have One more option i need to pass the created by as perameter in Jsp Page based on that user i need to get the password using (Encrprit ) command .
    Is it Possible to do in Passing the Parameter OAF to JSP page .and how to Encrprit the password to avoid entering the password .
    I hope U understand My Requirement..
    Regards,
    Kumar

  • Self secure page always displaing Login User Name as GUEST

    Hi,
    We need a self secure page which doesn't prompt for oracle username and password in OAF
    We devloped such page in OAF but every time it is displaying Login User Name As Guest.
    By using below site i did developed self secure page
    https://blogs.oracle.com/manojmadhusoodanan/entry/self_secured_page_creation_in
    I want to find out my OSUSER Name from OAF .my requiremnet is based on login user i need to restrisct or display data on page.
    If i execute below query from database is giving my OSUSER name but same is giving Server name if i execute same sql through OAF.
    SELECT sys_context('USERENV', 'OS_USER') BUN FROM dual;
    SYS_CONTEXT('USERENV','OS_USER')         IN OAF   ------------  oracusd(Server name)
    prkaduri
    Please guide me on this .Its very urgent requiremnet.
    Regards
    Panduranga reddy

    If you are using BIP11g and using the default installation then BIP11g security mode is set to Fusion Middleware.
    All users and groups are controlled by Fusion Middleware Security.
    Any authenticated user will be able to run reports as in former BIP releases "guest".
    But also noticed the authenticated user will also have a privilege you want to remove
    as for example permission to delete report.
    Take a look at this link:
    http://download.oracle.com/docs/cd/E14571_01/bi.1111/e10543/authentication.htm
    Cheers
    Jorge
    p.s
    1. In 11g you will have to read a lot before you can properly use the software, sorry.
    2. If this answers your question please grant the points and close the thread
    Edited by: Jorge Anicama on Mar 23, 2011 10:15 AM

  • Using the login user name in the report

    It will be appreciated if someone can help on the following:
    How can I use the login user name in the report?
    I mean that the report will be build on SQL statement look like :
    Select a, b, c, d
    For table
    Where a = <the user name used to login to htmldb>
    Thanks

    select a,b,c,d
    from table
    where a= :APP_USER

  • How to fetch the current login user name at the BI system

    Hi,
    In our scenerio we need a query to fetch the current login user name at the BI system. Would you please suggest the possibilities?
    Thanks and regards,
    Pradip

    Hi,
    The current login id will be available in text elements of query.
    Regards
    Akhan

  • UserName() function in one textbox is not refreshing and not giving the login-user name in the existing forms

    Scenario :
    I put one textbox in infopath 2010 form and using "userName()" function on this textbox.
    this function give us current username which is log-in into the site.
    and i am applying rule on the other controls on the basis of this textbox users login-id.
    This is working in one list.
    Now I am using the same thing in form library:
    but if I create one form and user which login are displaying on this textbox.
    but when i loggin the same site with another user and to open the same form there is still the name of the user which save the form not showing user name which is currently login.
    and If I click on "Add Document" then in the new form at this textbox the login user is showing.
    I don't know why it is not working or refreshing .
    Although I selected the "Refresh value when formula is recalculated"  in the textbox properties.

    Hello,
    You need to set this function on form load instead of textbox. Just click on form load from ribbon then add an rule and set this textbox value to userName(). Don't put any condition.
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • System.getProperty("user.name") not working without /etc/passwd, CentOS 4.3

    Dear all,
    I'm having trouble getting the system property user.name (which we need in our ant scripts) on our CentOS box. :(
    When running the program below thru
    java dumpproperties2
    it prints "user.name='?'" on our CentOS 4.3. On win32 it works. It turns out that if you add the account corresponding to the EUID to /etc/passwd it works correctly. However, we don't use passwd authentication but an enterprise wide LDAP-system. Our /etc/nsswitch.conf says:
    passwd: files ldap
    One work around is to replace the java executable with a script that does
    /path/to/jdk/bin/java -Duser.name=$USER -Duser.home=$HOME $@
    Used jdk is j2se 1.5.0_13 Linux 32-bit.
    Some questions for the experts:
    1) Is there any other way?
    2) Is it a known issue that Linux versions of the jdk just looks in /etc/passwd to map uid to user name (and home dir) instead of doing what the rest of the system, like whoami, does? I haven't found anything in either the readme or installation instructions, nor in the bug db.
    Br, Jesper Tr�g�rdh
    public class dumpproperties2 {
        public static void main(String[] args) {
         String s = System.getProperty("user.name");
         System.out.println("user.name='" + s + "'");
    }

    Does this work?
    //public final class System
    public static String getenv(String name)Then you can access the USER environment from inside Java.

  • Login user name in worklist

    Dears,
    can get user name login in worklist in ADF form page ? if yes pls how?

    did you try this? ADFContext.getCurrent().getSecurityContext().getUserName()

  • How to make any login screen forgets (login user names) ?

    In facebook and yahoo login screens, I find many (mistyped) names stored in a drop down menu to choose a user name
    I want to remove some entries from this drop down menu

    Hello,
    I am not sure if you can remove specific entries. But if you want to remove all of your history, or history from a certain time period, you can do so by:
    * History (or menu [[Image: New Fx Menu]] > History) > Clear Recent History
    Select Form & Search history, and anything else you would like to clear.
    You can change your settings as well to automatically delete this information in:
    * For Windows: Tools (or [[Image: New Fx Menu]]) > Options > Privacy
    You can choose to Never Remember History or set custom settings to only clear certain information when Firefox closes.
    Please see the article [[Remove recent browsing, search and download history]] for more information.

  • Trying to download updates on iPad but the incorrect user name keeps coming up. How do I change it without changing my correct user name that works on all other devices?

    When trying to download updates on iPad, the user name it is accessing is not correct. All other devices and actions are working correctly with the correct user name. How do I fix this?

    Thank you.....to be more precise....the id and password assigned to itunes is correct and works..but....when I hit 'update all' and get the small inset screen to sign iin....it is asking for a password to a different email address. I need it to use the icloud address I always use to puchase from itunes. I don\t know where it found this new email address?

  • How can I change my login user name to my current new email

    I need to change mu iCloud user name from my old email to me new one but it won't let me because it is the same as my rescue email address. How do I get around this if it is the only email address I have?

    Create another non-Apple email address to use and either use it as your new primary email address, or change the rescue address to the new address and then use the current rescue address as your new primary address.

  • How long can be the login user name ?

    Hi all,
    We are changing our user name policy from jvazquez to jose.vazquez. The new user name don't fit in the bname field. Anybody know if is possible to expand it or change this size ?? We're using basis 6.20 and r3 enterprise.
    Best regards and thanks in advanced.

    Ok, thanks.
    It confirms what found about this. But i've one more question, Do you recommend the single sign-on ? What are the most common problems we can find if we use it ?
    Best regards

  • I want to remove a saved login user name which always shows in my ist of usernames

    I inadvertanly typed my password at the end of a user login name and now this always shows in the list of usernames when I type the first characters of the username. Which is used constantly.

    See:
    * http://kb.mozillazine.org/Deleting_autocomplete_entries
    Remove saved Password(s):
    * Tools > Options > Security: Passwords: "Saved Passwords" > "Show Passwords"
    * https://support.mozilla.com/kb/Remembering+passwords

  • Query to select current login user name/id for Oracle 9i

    How do write the sql statement for retrieving the login name/id that i used to login to the database?

    SQL> select uid, user from dual;
           UID USER
             0 SYS
    Bye, Aron

  • Login user name missing

    How can this Happening???

    Hi mchrist,
    Have a looking at your respository.ini file and make sure the "OWNER" field is not set to blank or a different user schema name.
    If the OWNER field is set to Blank or a different user schema it automatically set the repository to read only.
    HTH
    Larry

Maybe you are looking for

  • How to get Assignment id in SSHR page

    1. I am trying to create a Self-Service page. To do it I need to get assignment id of the person logged into the sshr appliccation. I searched for sshrparams and found your thread that says it worked in 11i (11.5.10.2) so I am trying to make your cod

  • Iphone 5 direct line in recording from mixer

    I'm intending to buy an iphone in October and wants to find out if there are any external cables or devices I need in order to connect a direct line out from the mixer to the iphone 5 (I believe it should work the same in iphone 4s) to do recording.

  • Is there a way to hide the task bar that always displays in Mac OS?

    I'm referring to the area shown in the attached image.

  • PE 9 mußte nach Defekt des PCs neu aufgesetzt werden. Jetzt soll ich es erneut kaufen.

    PE 9 war auf der SSD meines neuen PCs installiert und funktionierte einwandfrei bis die SSD defekt war. Sie wurde im Rahmen der Gewährleistung ausgetauscht und PE 9 neu aufgespielt (bei der Lieferfirma des PCs). Jetzt teilt Adobe mir im Rahmen von PE

  • Need pricing data for invoice

    Hi Experts, I want to do some processing on pricing data for an invoice. I have invoice and item level data but am not able to get the pricing data from database tables. Please let me know the link to get pricing data from database tables for invoice