Hard code username & password for system
Hi All,
I'm using this piece of code to connect to the back-end via a defined system (with alias='CN')
try {
con = cgservice.getConnection("CN", cp);
catch (Exception e)
e.printStackTrace();
Is there a way I can hard code the username and password in this code instead of doing user-mapping on the portal?
Please help..urgent!
Thanks
Hi D.V.,
If you want all the users to connect using the same credentials, the 'correct' way would be to create one user mapping to the group 'everyone', and not hardcode the username and password.
You can also use a specific user instead of the logged on one when creating the ConnectionProperties.
To get an authenticated user see:
/thread/62774 [original link is broken]
and:
user.isAuthenticated() returns "False"
These are your options using JCA.
There are also ways to connect to the system using explicit credentials, which depends on the system type (SAP - use JCO, JDBC - use java.sql.DriverManager).
Hope that helps,
Yoav.
Similar Messages
-
HI,
I have installed Oracle 10g DB on XP. After installation of ORACLE DB, "DATABASE CONFIGURATION ASSISTANT" dialog box came, but i mistakenly click on OK button instead of clicking on PASSWORD MANAGEMENT to set the password for SYSTEM / SYS.
Now when i am trying to login using user id and password, SYSTEM or SYS with password either by Oracle or CHANGE_ON_INSTAL then error is coming as :
ERROR: ORA-01017: invalid username/password; logon denied
DB installation was done on my laptop for testing / learning purpose only.
Would you pls. help to login as SYSDBA / SYSOPER using SYSTEM or SYS ID.
ThanksHI,
On UNIX the Oracle executable has two group names compiled into it,one for SYSOPER and one for SYSDBA.
These are known as the OSOPER and OSDBA groups.Typically these can be set when the Oracle software is installed.
In this case when you issue the command 'CONNECT / AS SYSOPER' Oracle checks if your Unix logon is a member of the 'OSOPER' group and if so allows you to connect. Similarly to connect as SYSDBA your Unix logon should be a member of
the Unix 'OSDBA' group.
Please check whether the user belongs to OSOPER group.
thanks,
Krishna -
How will i disable the auto sign in of my username & password for facebook?
If you saved the password in Firefox, you can clear that here:
orange Firefox button > Options > Security > "Saved Passwords"
''or''
Tools menu > Options > Security > "Saved Passwords"
It's also possible that you have a cookie that keeps you logged in, but in that case, signing off from Facebook should end your session. -
Username/Password for Examples App
This is probably a stupid question, but does anyone know the Username/Password for Vikas's Examples Application? I downloaded and imported it into my workspace but when I run it, I cannot log in!!!
Hello,
Are you speaking about this app:? http://apex.oracle.com/pls/otn/f?p=24317:500:1182459246082825
You can send Vikas always a mail, he has contact info on there.
I guess you asked that question also in another thread (chart in report)?
Regards,
Dimitri
-- http://dgielis.blogspot.com/
-- http://apex-evangelists.com/
-- http://apexblogs.info/ -
Problems setting up username & password for SQL
Due to the outstanding advice I recieved from this excellent forum, I have managed to overcome my first problem with declaring a new Class.
This leads me to request help with my next biggest problem:
Setting up a user GUI that takes a "username" & "password" that will be used to access a password protected database.
I am a simple bloke, with simple thought processes, so please, go easy on me...
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
public class DBQuery1 {
String username = "" , password = "";
public static void main(String[] arguments) {
PassDB UPass = new PassDB();
String data = "jdbc:odbc:JavaTestDataBase";
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager.getConnection(data, "" + username, "" + password);
Statement st = conn.createStatement();
ResultSet rec = st.executeQuery(
"SELECT Title, ContactID, First, Last, Dear FROM Contacts "
+ "WHERE (Title='Mr') ORDER BY ContactID");
/* ResultSet rec2 = st.executeQuery(
"SELECT Subject, ContactID FROM Calls "
+ "WHERE (Subject Is Not Null) ORDER BY ContactID");
System.out.println("\nFirst Name\tSurname\t\tNick Name\t\tSubject\n");
while(rec.next()) {
System.out.println(rec.getString(3) + "\t\t" + rec.getString(4) + "\t\t" + rec.getString(5) /* + rec2.getString(1) */ );
st.close();
catch (SQLException s) {
System.out.println("SQL Error: " + s.toString() + " " + s.getErrorCode() + " " + s.getSQLState());
catch (Exception e) {
System.out.println("Error: " + e.toString() + e.getMessage());
class PassDB extends javax.swing.JFrame implements ActionListener {
String username = "", password = "";
JTextField uname = new JTextField(10);
JTextField pword = new JTextField(10);
// JPasswordField pword = new JTextField(10);
PassDB() {
super("duBe's database logon");
setSize(220, 160);
setDefaultCloseOperation(EXIT_ON_CLOSE);
JPanel pane = new JPanel();
JLabel unameLabel = new JLabel ("Username: ");
JLabel pwordLabel = new JLabel ("Password: ");
JButton submit = new JButton("OK");
submit.addActionListener(this);
pane.add(unameLabel);
pane.add(uname);
pane.add(pwordLabel);
pane.add(pword);
pane.add(submit);
setContentPane(pane);
setVisible(true);
public void actionPerformed(ActionEvent evt) {
PassDB clicked = (PassDB)evt.getSource();
username = uname.getText();
password = pword.getText();
This code generates two errors, stating:
C:\Java_progs>javac DBQuery1.java
DBQuery1.java:14: non-static variable username cannot be referenced from a static context
Connection conn = DriverManager.getConnection(data, "" +
username, "" + password);
^
DBQuery1.java:14: non-static variable password cannot be referenced from a static context
Connection conn = DriverManager.getConnection(data, "" +
username, "" + password);
^
2 errors*****************************
The code works when I remove the reference to the variables "username" & "password" in Connection "conn" call & replace them with the actual username & password, but this is not exactly what I was after. I was hoping to make the program responsive to each individual user, not set in code.
I also would like to make the program pause after the call in "main" to "PassDB" to wait for "PassDB" to exit before continuing.
I would also like to make "PassDB" destroy itself after the "OK" button is pressed & the "username" & "password" set.
If that isn't enough for you, I would really like the program to search 2 different database tables, return their values & compare them to be sure that they are the same.
When I try & search 2 different tables, as in:
ResultSet rec = st.executeQuery(
"SELECT Title, ContactID, First, Last, Dear FROM Contacts "
+ "WHERE (Title='Mr') ORDER BY ContactID");
ResultSet rec2 = st.executeQuery(
"SELECT Subject, ContactID FROM Calls "
+ "WHERE (Subject Is Not Null) ORDER BY ContactID")javac tells me that "ResultSet" is set to null 0
As always, I am extremely appreciative of any assistance you are able to offer.
Kind regards
duBedat
[email protected]This is where I'm at now:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
public class DBQuery {
static String username = "" ;
static String password = "" ;
public static void main(String[] arguments) {
PassDB UPass = new PassDB();
String data = "jdbc:odbc:JavaTestDataBase";
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager.getConnection(data, "" + DBQuery.username, "" + DBQuery.password);
Statement st = conn.createStatement();
ResultSet rec = st.executeQuery(
"SELECT Title, ContactID, First, Last, Dear FROM Contacts "
+ "WHERE (Title='Mr') ORDER BY ContactID");
/* ResultSet rec2 = st.executeQuery(
"SELECT Subject, ContactID FROM Calls "
+ "WHERE (Subject Is Not Null) ORDER BY ContactID");
System.out.println("\nFirst Name\tSurname\t\tNick Name\t\tSubject\n");
while(rec.next()) {
System.out.println(rec.getString(3) + "\t\t" + rec.getString(4) + "\t\t" + rec.getString(5) /* + rec2.getString(1) */ );
st.close();
catch (SQLException s) {
System.out.println("SQL Error: " + s.toString() + " " + s.getErrorCode() + " " + s.getSQLState());
catch (Exception e) {
System.out.println("Error: " + e.toString() + e.getMessage());
class PassDB extends javax.swing.JFrame implements ActionListener {
static boolean getOut = false;
JTextField uname = new JTextField(10);
JTextField pword = new JTextField(10);
// JPasswordField pword = new JTextField(10);
public PassDB() {
super("duBe's database logon");
setSize(220, 160);
setDefaultCloseOperation(EXIT_ON_CLOSE);
JPanel pane = new JPanel();
JLabel unameLabel = new JLabel ("Username: ");
JLabel pwordLabel = new JLabel ("Password: ");
JButton submit = new JButton("OK");
submit.addActionListener(this);
pane.add(unameLabel);
pane.add(uname);
pane.add(pwordLabel);
pane.add(pword);
pane.add(submit);
setContentPane(pane);
while(getOut == false)
setVisible(true);
public void actionPerformed(ActionEvent evt) {
PassDB clicked = (PassDB)evt.getSource();
DBQuery.username = uname.getText();
DBQuery.password = pword.getText();
getOut = true;
} Any advice is greatly appreciated
duBe -
Setting the username & password for the plain http adapter.
Hi,
When i am passing in an HTTP request into the integration engine's plain_http adapter url, i am required to give a username and a password for authentication.
Is it possible to set this username and password globally some where, to avoid this to be given again for each message?
The requirement is like, all http messages from our partners will be routed through a proxy in the DMZ which would have an authentication and we donot want the XI user credentials to be given again.
Thanks & Regards,
Renjith.If you want to just test http adapter use the code by stefan grube in the following thread.
/message/266750#266750 [original link is broken]
Thanks for the points
regards
SKM -
Enter administrator password or power on password for "System Disabled 94238025"
I get the message, "Enter administrator password or Power on Password" when I open my laptop. What code do I enter in my HP 2000 when I receive the message "System Disabled 94238025". I appreciate any help you can give me!
Hi: Please read the first post at the link below which should resolve your dilemma. http://h30434.www3.hp.com/t5/Notebook-Operating-Sy... Then... You can: 1. Use the unlock code you generated to enter the BIOS
2. Disable all passwords that are enabled in the BIOS's security menu.
3. If asked for current password - type the unlock code
4. For new password, just press ENTER key
5. Repeat the same for verify password column. -
Need Administartor Password for - System Disable Key: is 62187718
Need Administartor Password for CQ62 215DX - System Disable Key: is 62187718
Hi, Use the below code to reset 73885338 Or generate one from the below link http://bios-pw.org/ 1. Use the unlock code you generated to enter the BIOS
2. Disable all passwords that are enabled in the BIOS's security menu.
3. If asked for current password - type the unlock code
4. For new password, just press ENTER key
5. Repeat the same for verify password column. -
I am unable to store my username & password for email accounts.
this article was not able to help me:
https://support.mozilla.org/en-US/kb/usernames-and-passwords-are-not-saved#firefox:win7:fx27
i tried the password manager settings, but did not see a list of sites in the exceptions list!
the "always use private browsing feature" is not checked off in my privacy settings!
the "clear history when firefox closes" feature is not checked off in my privacy settings!
i do not have password manager software embedded in my antivirus software!
the "remember password" prompt does not always operate!!! i do not always see this when attempting to log into my email accounts, especially if entering a new email address!!
any assistance you provide would be appreciated.hello, websites can specify if browsers should be able to save username/passwords (through the autocomplete="off" attribute in the login form in the html source code) - this is often the case when a higher level of security is presumably required by those sites.
you can either [https://addons.mozilla.org/firefox/addon/remember-passwords/ install an addon] or [https://www.squarefree.com/bookmarklets/forms.html#remember_password use a bookmarklet] to circumvent this restriction. -
Ipad can't store username password for websites
I'm using an iPad Wifi with 3.2.1 and I am not the only one that is having a problem with Safari storing username and password for websites that need credentials.
I cleared 'cookies', 'history' and 'cache' but that doesn't help.
The desired websites don't show a popup if I would like to store the username and password for a website.
Message was edited by: Wolfii82JimHdk wrote:
Wolfii82 wrote:
I'm using an iPad Wifi with 3.2.1 and I am not the only one that is having a problem with Safari storing username and password for websites that need credentials.
I cleared 'cookies', 'history' and 'cache' but that doesn't help.
The desired websites don't show a popup if I would like to store the username and password for a website.
Message was edited by: Wolfii82
Web sites with high security, i.e., banks, financial institutions, etc., do not allow user-id/password saving. If you are visiting one of these it is normal for no save dialog to be displayed in Safari.
We could say more if you identified the web sites that you are talking about.
I wouldn't allow the user name/password to be stored for any financial institution, even if the website allowed it. And the iPad isn't exactly the most secure device, so I would be really concerned if I lost it. -
ORA-01017: invalid username/password; for Oralce 12c OEM installation
Hi Experts,
Following error Oralce 12c OEM installation ,i have no clue sys user passowrd is correct in response/new_install.rsp file
[oracle@sdp12 OEM_Packages]$ ./runInstaller -silent -responseFile /oracle/oracle8/OEM_Packages/response/new_install.rsp
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 400 MB. Actual 1222 MB Passed
Checking swap space: must be greater than 150 MB. Actual 4000 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2013-02-24_06-22-19PM. Please wait ...[oracle8@sdp38 OEM_Packages]$
ERROR: ERROR:Exception occurred while connecting to database. Check the connection details of the database you specified and retry.
ORA-01017: invalid username/password; logon denied
Unable to connect to the database and validate whether it is a supported database due to one of the following reasons:
(1) Incorrect credentials
(2) Listener may be down
(3) Database may be down
Check the credentials ,the status of the listener and the database and retry.
i am able to connect using same username password
[oracle8@sdp38 response]$ sqlplus sys/sys512@TET1
SQL*Plus: Release 11.2.0.1.0 Production on Sun Feb 24 18:29:15 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
From response/new_install.rsp file
DATABASE_HOSTNAME=sdp12
LISTENER_PORT=1521
SERVICENAME_OR_SID=TET1
SYS_PASSWORD=sys512
SYSMAN_PASSWORD=sysman512
SYSMAN_CONFIRM_PASSWORD=sysman512
i have no clue here, any help greatly appropriated
thanksfew things you can check :
a) Is there a password file ? Is the password correct in it ?
b) SYSDBA remote login is disabled. remote_login_passwordfile is not set to EXCLUSIVE in the spfile or init.ora.
Set: remote_login_passwordfile= EXCLUSIVE
Create a password file:
Unix: $
orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=sys entries=5
Windows:
C:\> orapwd file=%ORACLE_HOME%\database\pwd%ORACLE_SID% password= sys entries=5
To synchronize the password for sys for normal connections and connections as sysdba connect as a sysdba user and reset the sys password:
$ sqlplus "/ as sysdba" SQL> ALTER USER SYS IDENTIFIED BY change_on_install; -
Username passwords for client 000
Dear All,
I don't have credentials of SAP* DDIC in DEV QAS and PRD of client 000.
Can you please let me know steps to recover the passwords?
Please let me know the steps or ways . don't put external links
Regards
NikhilHi Nikhil,
You follow below process to reset the password and login to your ABAP system
1) set profile parameter login/no_automatic_user_sapstar=0 in instance profile
2) Delete SAP* from database table from client 000
SQL> delete from <schema>.<USR02> where bname='SAP*' and MANDT='000'
3) Take restart of SAP application
4) Login to 000 client with user = SAP* and password= pass
5) Using this ID you can reset password for other users like DDIC.
6) Once You can login with DDIC , you may create SAP* again using SU01.
Hope this helps.
Regards,
Deepak Kori -
Keychain password for system chain
inside the keychain file, there is a keychain called system, it stored my wireless password, and there is a keychain call web access,which is now still empty, both are locked, I do not think I ever have a password for them, now I can not unlock it, because I never assigned a password, but it ask me for a password, before I can unlock it. How to get access to these two keychain?
Password issues are mysterious and so far I haven't had any luck in Apple Discussions finding someone with a similar problem. Using Keychain Access, I can unlock my System Keychain, but then I want to view one of the password items in this now unlocked keychain, say for example, our ship's WiFi network password. I am asked for the Keychain's password (I assume it is the password I just used to open the System Keychain) but a dialogue box appears telling me I am entering the incorrect password. Any ideas what's happening here?
Many thanks,
Michael -
Emca Continually Shows "Invalid username/password" for the DBSNMP User
Hi,
During configure dbconsole DBSNMP user is giving invalid password whereas i am able to connect dbsnmp using sqlplus as below.
SQL> conn dbsnmp/dbsnmp@UAT
Connected.
while i m tryin to configure dbconsole got below error
emca -config dbcontrol db -repos create
$emca -config dbcontrol db -repos create
STARTED EMCA at May 29, 2010 4:29:31 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: UAT
Listener port number: 1521
Password for SYS user:
Password for DBSNMP user:
Invalid username/password.
Password for DBSNMP user:
Invalid username/password.
Password for DBSNMP user:
ThanksHi,
Ok i will do in future.
I did as you said but issue is still coming.Now the error is bit different in the log file For this same error i found solution in meta doc id 337260.1 for exact error In the solution i have to to set the value as below but it has already same value.
Error:
CONFIG: SQLEngine created successfully and connected
May 29, 2010 5:03:06 PM oracle.sysman.emcp.DatabaseChecks validateUserCredential
CONFIG: Failed to update account status.
oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-01034: ORACL
E not available
Solution:
In order to fix the Invalid username/password message
Check the profile limit for the users SYSMAN, DBSNMP and MGMT_VIEW
select u.username, u.profile, p.resource_name, p.limit
from dba_profiles p, dba_users u
where p.profile=u.profile
and u.username in ('SYS', 'SYSMAN','DBSNMP','MGMT_VIEW')
and p.resource_type = 'PASSWORD'
order by u.username, p.resource_name;
If the value of LIMIT for PASSWORD_VERIFY_FUNCTION is not NULL:
Change the password so that it meets the function requirements.
If the value of LIMIT for PASSWORD_REUSE_MAX is not UNLIMITED:
Change the password so that it is different from a password that has already been used the number of times set in PASSWORD_REUSE_MAX.
Or
Change the value of LIMIT for PASSWORD_REUSE_MAX to UNLIMITED for the profile.
Below output of 1st query:
USERNAME PROFILE RESOURCE_NAME LIMIT
DBSNMP DEFAULT FAILED_LOGIN_ATTEMPTS UNLIMITED
DBSNMP DEFAULT PASSWORD_GRACE_TIME UNLIMITED
DBSNMP DEFAULT PASSWORD_LIFE_TIME UNLIMITED
DBSNMP DEFAULT PASSWORD_LOCK_TIME .0006
DBSNMP DEFAULT PASSWORD_REUSE_MAX UNLIMITED
DBSNMP DEFAULT PASSWORD_REUSE_TIME UNLIMITED
DBSNMP DEFAULT PASSWORD_VERIFY_FUNCTION NULL
SYS DEFAULT FAILED_LOGIN_ATTEMPTS UNLIMITED
SYS DEFAULT PASSWORD_GRACE_TIME UNLIMITED
SYS DEFAULT PASSWORD_LIFE_TIME UNLIMITED
SYS DEFAULT PASSWORD_LOCK_TIME .0006
SYS DEFAULT PASSWORD_REUSE_MAX UNLIMITED
SYS DEFAULT PASSWORD_REUSE_TIME UNLIMITED
SYS DEFAULT PASSWORD_VERIFY_FUNCTION NULL
Thanks -
Reset Username / PAssword for FAS270
Hi Guys, I am new here and I just created my account days ago. I was ask to configure an FAS 270c and DS14-MK2 here at the office. I am also new to this technology, but I was able to have it up and running last week without error based on the LED's of the machine, both FAS270 and DS-14 My porblems is that, I am prompted by a username and password which the people here does not know about. My question is, How can you or I reset the username/password combination of an ONTAP system. Hope to hear from you on this matter. Thanks very much in advance. Jose Eliazar Bayaton
The only way I know how to change a root password is to reboot the filer. You can just power cycle the filer since you can't login to type reboot.Press Ctrl-C to display the boot menu when prompted to do so.The storage system displays thefollowing boot menu:1) Normal Boot2) Boot without /etc/rc3) Change Password4) Initialize all disks4a) Same as option 4, but create aflexible root volume.5) Maintenance mode bootSelection (1-5)?Choose 3 to change root password...I would also set security options forpasswords like:options security.passwd.rules.maximum 14options security.passwd.rules.minimum.alphabetic 6I hope this is helps
Maybe you are looking for
-
Volume control with USB Audio device
Hello all. I have just purchased a cheap USB audio device to connect my HiFi to my laptop with only one, neat USB lead and a USB hub - meaning I no longer need several USB wires and an audio cable across my desk. This works fine, but I have just noti
-
Can I upgrade my black macbook graphic card to the aluminium mac's GEForce 9400M? Currently using GMA X3100.
-
Hi to all, I am a new Coldfusion developer coming from Java EE world. I am looking for hints on how to manage the deployment lifecycle of a CF website. Instead of direct editing (with Dreamweaver) cfml files on server, what are the best practices? I
-
I'm getting this error when I sync my iPhone: Some of your photos, including the photo "DSC00059.JPG", were not copied to the iPhone because they cannot be displayed on your iPhone. A spotlight search reveals 2 photos with that name on my computer bu
-
Shift-z on my Macbook pro doesn't work.
I've got a Retina Macbook Pro and I can't type a capital z. For some reason shift-z just doesn't work. Shift + any other key works fine. I can also use caps lock to create a capital z. I checked keyboard, accessibility and speech settings to see