Password in Java

Hello,
I need that in a Java program, when I write in its Terminal, the things I write don't appear in that terminal.
Can Somebody Help me?
Thanks
Sorry for my english

I need that in a Java program, when I write in its
Terminal, the things I write don't appear in that
terminal.If you have Java 1.6 installed, you can use the readPassword(...) method from the Console class:
http://java.sun.com/javase/6/docs/api/java/io/Console.html
Else, have a look at this article:
http://java.sun.com/developer/technicalArticles/Security/pwordmask/
Good luck.

Similar Messages

  • Returning User Password in Java code for custom reports

    Hi I'm doing a custom report and for the life of me I can't seem to find the password field in the database. :(
    Anyways I'm thinking maybe I can use java code to return the password and then using the decrypt password function. Could someone please shed some light on this!!!
    Note: I need to return the User password using java code and not XPRESS code. It would be best if someone either shows me how you can get the password using a java method or tell me where the User password is stored as I'm going crazy trying to find it in the DB!!!
    Thanks in advance!!!

    well... not sure what your Java code does. But if you can get the WSUser object for each user, you could call getPassword on the object to get the user's password

  • Changing db2 mainframe password from java

    Hey guys
    Is there any way we could change the DB2 password from java program.
    thanks,
    Balaji

    My current appliccation has a swing based front end.
    From this front end we access DB2 DB which runs on mainframe.
    Based on user name and password authentication we determine the screen access for the users. Now the problem is there are users who dont access the DB directly other than for changing the password .
    All other details they need they access from our application.
    So if it is possible for them to change the password also from our application then they need not directly connect to the data base. Hope i am clear.
    Thanks
    Balaji

  • Using SSO username/password in java portlet for Database Connection

    Hi all,
    We implemented java portlet with environment Oracle Application server 10.1.2 and Portal 10.1.4
    At present we are picking the database username and password and connect string in properties and our
    java class is reading the properties file and connecting to database to fetch the records.
    Our idea is to not to pick the username/password and connect string from the properties file or
    not to configure the datasource in data_source.xml.
    Our Requirement is who ever login to the Portal(SSO) our java class should pick the sso username/password and
    connect to database to fetch the record(s).
    Because our database users are one to one mapped to sso user(s) of portal.
    We request anyone to guide us how can we do it or suggest any suitable solution for our requirement.
    Thanks
    Dan Tey

    I think this is a no-go, since you cannot retrieve a cleartext password from the OID if I'm correct.

  • How to automlog into webside using username and password using java program

    I am trying to log in to a website using password and username. What libraries i can use. I searched online and came to know that i can use Apache's commons HttpClient library to do that. I am new to this please let me know what can i use.
    For starting purpose i wrote this code:
    public static void main(String[] args) throws URIException {
         try {
              HttpClient client = new HttpClient();
              GetMethod method = new GetMethod("http://www.google.com");
                   int returnCode = client.executeMethod(method);
                   System.err.println(method.getResponseBodyAsString());
              method.releaseConnection();
              } catch (HttpException e) {
                   e.printStackTrace();
              } catch (IOException e) {
                   e.printStackTrace();
    but this is giving me an error. please see below,
    java.net.UnknownHostException: www.google.com
         at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
         at java.net.PlainSocketImpl.connect(Unknown Source)
         at java.net.SocksSocketImpl.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.<init>(Unknown Source)
         at java.net.Socket.<init>(Unknown Source)
         at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)
         at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122)
         at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
         at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
         at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
         at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
         at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
         at com.verizon.zoeott.ingest.PropertyFileReader.main(PropertyFileReader.java:48)
    Another thing is that we use proxy to get internet connection. In internet explorer-->internet options-->LAN Settings-->using automatic configuration script to connect to the internet.
    I don't know how to configure this into java program. please help.
    Thanks,
    amol
    Edited by: 877846 on Jan 20, 2012 9:16 AM
    Edited by: 877846 on Jan 20, 2012 9:21 AM

    Also please let me know about how to connect internet through proxy server.As I said above, if you are using the Apache HTTP client, no we can't, as this is not an Apache forum. I also told you where to find that answer.
    If on the other hand you don't want to use that client any more, setting the system properties http.proxyHost and http.proxyPort will do it for java.net.HttpURLConnection. See the Java Custom Networking tutorial for examples.

  • ORA-28183 when connect proxy user with password from java

    1. Create user on database 10.2.0.1.0
    create user scott identified by tiger;
    create user jeff identified by secnt;
    grant connect, resource to scott;
    grant create session to jeff;
    alter user jeff grant connect through scott authenticated using password;
    2. Try to open proxy session from java
    DriverManager.registerDriver(new OracleDriver());
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@//db.garage:1521/ILINK", "scott", "tiger");
    if (conn != null && conn instanceof OracleConnection) {
         Properties properties = new Properties();
         properties.put(OracleConnection.PROXY_USER_NAME, "jeff");
         properties.put(OracleConnection.PROXY_USER_PASSWORD, "secnt");
         ((OracleConnection)conn).openProxySession(OracleConnection.PROXYTYPE_USER_NAME, properties);
         ((OracleConnection)conn).close(OracleConnection.PROXY_SESSION);
    conn.close();
    3. Got the following error for step 2
    Exception in thread "main" java.sql.SQLException: ORA-28183: proper authentication not provided by proxy
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:277)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
         at oracle.jdbc.driver.T4CTTIoauthenticate.receiveOauth(T4CTTIoauthenticate.java:647)
         at oracle.jdbc.driver.T4CConnection.doProxySession(T4CConnection.java:852)
         at oracle.jdbc.driver.PhysicalConnection.openProxySession(PhysicalConnection.java:1548)
         at ch.tie.cluster.Test.run(Test.java:30)
         at ch.tie.cluster.Test.main(Test.java:19)
    4. If i grant connect without using password like:
    alter user jeff grant connect through scott
    everything is fine, but i need password authentication.
    Thanks in advance.

    did you try using the oci driver?

  • Connecting to SMTP mail server using user name and password in java

    Hi,
    I am trying to send mail using SMTP server in java.
    But my SMTP server only allows valid users to send mails. I need a way to pass my user name and password to my SMTP server.
    How do I do this ?
    Thank you
    Ramesh

    I think the client is not able to do a HTTP POST
    to the WLS server but it can do a HTTP GET.
    I dont know why.
    http://manojc.com
    "Ganesh" <[email protected]> wrote in message
    news:3eba91bc$[email protected]..
    >
    Hi,
    I deployed a rpc web service using WLS 7.0 SP2 in HP-UX 11 environment.When I
    invoke the web service through my browser (IE 6.0) using the web servicesurl,
    it brings my service method correctly. From there, if I click the invokebutton
    it asks me for a network user name and password under "weblogic" realm???If I
    provide the admin user credentials (which I supplied while creating mydomain)
    it is not accepting that it keeps popping up this network user passwordwindow
    over and over. Not sure which username/password I have to provide here tosee
    the result of my service.
    If I try to invoke the web service through my client (static) I am gettinga connection
    refused exception. I guess either way, I am not able to access my webservice.
    In the attached file, I have cut and pasted the client stack trace as wellas
    the server log trace from weblogic.
    Any ideas would be highly appreciated.
    Thanks,
    Ganesh

  • Looking up a BPEL process without hardcoding password in Java code

    We know how to lookup a BPEL process from a Java client.
    We normally connect to the BPEL PM instance (where the BPEL process has been deployed) using the Locator and IDeliveryService classes.
    However, while doing so, we are forced to hard code the domain id and the relevant password in the code. For e.g.,
    // Connect to domain “default” using password “bpel”
    // null IP address means local server
    Locator locator = new Locator("default", "bpel", null);
    IDeliveryService deliveryService =
    (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME);
    Is there a good alternative that will not require the password in the code? One option is to pass the password as an argument to the program. Are there any other options that will allow the lookup of the process without specifying any password?

    Locator locator = new Locator("default", null);
    This works for me!

  • What is the default password in java keystore?

    Hi!
    I want to add my cert to java keystore (/Library/Java/Home/lib/security/cacerts) but i need the default password.
    I readed much forum topic, but 'changeme' and 'changeit' not working.
    I have a clean system, i dont changed th password.
    Also possible to add keychain certs to java keystore?
    Thank You!

    kiran666, iOS devices will ask for a password if either you have set a screen-lock password OR you or your parents have set a restriction password. If you cannot get this password, and you have "find my iphone" turned on, use the "whip" option. It will reset to it's factory settings. If you do not, I suggest you do what KiltedTim suggested and put your iPhone in DFU mode or restore mode by simply holding home and power until the restore icon appears on the phone and restore using iTunes.

  • Default Screensaver SessionTimeout  Prompted Password for Java not CDE

    I managed to set the default screensaver timeout feature for my Solairs 10 users who prefer the CDE login look and feel however, those who wish to use Java login look and feel, how so I set the default screensaver timeout feature so when my users are prompted for a password after 10 minutes of inactivity?
    A million thanks
    John

    Ok found the JAVA Screen Saver Default config file thanks to the manpage on manpage screensaver or manpage xscreensaver. Although I change by CDE screensaver config file the screensaver is not activating. I think the problem is my screensaver executeable, not the settings. Does anyone know when users are in CDE using Solaris 10 how they can launch the ScreenSaver not the XLock? I can not seem to find anything on how to lauch the Screensaver in CDE Mode.
    Thankks
    John

  • Handling Password using java.io.*

    Hi,
    I want to know how to let the user to enter the USER NAME and PASSWORD so that UserName is visible to him and Password is invisible while typing, but read while typing. I am trying to do all this from dos prompt. I dont want GUI based solution.
    As an example unix logon best suits my requirement.
    I want to know whether Java supports this facility.
    Please help.............

    The only way I could do this (in Java) was to build a gui and use the echo character, displaying a frame with a text field in it.
    There are C interfaces to allow text to be keyed without echoing on the command line, so a JNI program might be in order.
    I would appreciate it if someone can show the way to a simple command line interface.
    Hackmann

  • Remove and/or change password Sun Java System Web Server 7.0U3

    Running SJSWS 7.0U3 on Solaris 10 U6
    I have access to the physical box the server is running on.
    I must have set something by mistake, now trying to connect to http://ipaddres/host:80 I get prompted for a username password. This is NOT the admin password prompt.
    Things have changed significantly since the s.x days.. So,
    How do I reset and/or remove the password prompt??
    Thanks
    J.

    Actually, nothing much has changed in respect to that behaviour. ACL seems to be doing exactly what it should be for weird URL like the one you are using. Check the default.acl file.

  • How-to access username and password protected Java EE Web services from ADF

    The title of this post is exactly the same as this article by Frank Nimphius:
    http://www.oracle.com/technology/products/jdev/howtos/1013/protectedws/access_protected_web_services_from_adf.htm
    The article addresses the problem of securing web services using usernames and passwords, when those web services are accessed through a proxy or a data control. In the examples, the user names and passwords are specified, whether in the code or the definition of data controls. (SKING/SKING).
    In a very common scenario, users login to reach a page, for example, A.jspx, which contains a button that calls a web service, for example displayDate. Suppose that user has logged in by username/pass of (AHUNOLD/AHUNOLD) and AHUNOLD has access to the service and the page. Is there any way to pass the logged in user name and password to the webservice ? Of course we can hard-code the username in the data control definition or proxy code, but this is just one of the thousands of users who have access to the service and the authentication is not dynamic this way.
    Hope my question is clear. Wishing you all a great Christmas.
    Farbod

    Hi Frank, and happy new year.
    Are you implying that it couldn't be done declaratively? What is your suggestion for this problem? You know the problem... As I described:
    - I need to secure my web services, so when exposed, no one from inside network or the internet, can access the web service without proper permission
    - The web services are shown as web controls on jspx pages. The user has logged in before reaching the page. It is irrelevant to ask him to enter user name and password again.
    - I have user names, passwords and roles in Oracle Internet Directory (Identity Management). It provides some APIs and I can retrieve the usernames and attempt logging in programmically. But how can I get username and password from the session in ADF application?
    I guess using SAML or certificate could be the solution, but I have a problem with SAML, described here:
    Re: Webservices Security, SAML, and Identity Management (OID)
    Best Regards,
    Farbod

  • How to hide user id and password in java

    Hi, I have a j2ee application and somehow they need to know the weblogic system id and password in order for their application to work. We are the administrators and we normally do not tell this id and password.
    Now, how can i suggest my application people to use an envrypted id and pass ....i do not know if boot.properties file could be used ?
    this is the id and pass to logim to the weblogic console.
    any suggestions please ?

    With a good enough hash function, hashes are effectively unique.
    Say I have a good hash function, H.
    Say I have a user, Bob. His password is "bobrocks".
    H("bobrocks") = 1B // in hex; really small hash, but this is an example.
    So I store in my database (bob : 1B)
    Bob wants to login. He types in his password, which I then hash. I compare this hash to the stored hash. They match, and Bob logs in. If you typed in "balogna", the hashes wouldn't match, and you would not log in.
    Note that the password database stores 1B - from this hash, you can't tell what the password is. You can, however, tell if someone types in a password that matches it.
    That's the simple version. I suggest you read some books, do some research, and ask some questions on the Cryptography forum to understand the whole thing.
    ~Cheers

  • Password protection java.io.File

    Hello,
    Is it possible to set a password for a file created using File.
    I mean, if I create file using new File("c:\\ab.xls");
    Can I set a password for this file to make it secure.
    Thanks

    That doesn't create a file for a start, it just creates a File object in memory, i.e. a representation of the filename.

Maybe you are looking for

  • TS1717 when trying to listen to songs in the itunes store my system keeps rebuffering, what is this and how can i stop this

    When trying to listen or buy music from the itunes stores my system keeps rebuffering so this enables me to even download music because it keeps shutting off and coming back off this is a problem and would like to know how to fix it?

  • Import entourage files into mail

    I just upgraded without I guess reading the fine print. I used Entourage for my e-mails and can't open it anymore with OS X Lion. How can I import my thousands of mails and archived stuff into Apple Mail?

  • Managed System Configuration - PI7.1 system solman_setup

    HI all, In trying to execute the step "Managed System Configuration" for a PI7.1 system in Solution Manager SOLMAN_SETUP, in the first step to "maintain the connection", its failing immediately with: Error when opening an RFC connection Establish con

  • Error message 06 585 and 587

    Hi, Want to know what is difference between the error message 06 585 and 06 587. What are the criteria on which system gives the above error messages when we create Purchase order. Thanks in Advance.

  • Method for accessing multiple DAQ cards

    Hello, I am trying to access two analog-input cards in a "ping-pong" type fashion with LabVIEW 7.1. The two cards are PCI-6052E DAQ cards (call them "B" and "C"). What I'd like to do, is get data in this fashion: B/ai0, C/ai1, B/ai2, C/ai3, B/ai4 ...