Accessing database via OID username and password
I've have 2 servers, one with the following software:
--- SERVER #1 ---
* Oracle database v9.2.0.1
* Management Server
* OID
--- SERVER #2 ---
and the other database server with:
* Oracle database v9.2.0.1
* and the database that it is registered (via dbca) with the OID database above...
I'm pretty sure everything is pretty close to configured correctly due to the
the following: only 1 tnsnames file exist on my laptop, from the DOS prompt, if I comment out the tns entry that points to the database on server #2 then tnsping
the database on server #2 it returns a message saying that it uses the LDAP file and it comes back with a message that ends w/OK, meaning (or what I believe means) that it hit the OID server for authentication.
My only issue is logging in though, I always get a invalid username & password error message.... I did log into "Enterprise Securtiy Manager" on server #1 and register the database from server #2.... I also created that guest user w/"create user guest identified globally as '';".... I also created the "schema mapping" on server #1 to the guest schema and users within OID.... On what server was I supposed to run this command: "create user guest identified globally as '';", on server #1 or #2? I read a lot of stuff on the Internet about Oracle Wallets, not sure where this comes in, is this where I'm going wrong? When I ran the DBCA assistant on the db on server #2 it didn't prompt\ask for any Oracle Wallet info....
What am I missing???
Thanks in advance for your help,
Wes
You have another thread on this as well.
Server 1 is the LDAP server (Oracle's implementation of it: OID), it can be used for network alias resolving as well as for authentication and authorization.
There is no need to use OID for network resolving, so let's skip that. The only need is that server#2 is registered in OID (server#1) - the wallet comes in when server#2 needs to communicate passwords with OID - when you used DBCA on server #2, it should have created the wallet, altered your network (on server#2), and created ldap.ora.
On server #2:
- sqlnet.ora should contain LDAP in addition to other configured options on the names.directory_path entry
- ldap.ora should contain your ldap server location, default (realm) context, and type (=OID)
After running DBCA, you should be able to see the instance on server#2 in cn=OracleContext,dc=<your default realm context> in Oracle Directory manager (ODM)
All the mapping stuff, I answered in the other thread, although I always use:
create user global_schema identified globally;
This works for 10G - and there have been changes from 9 to 10, but I'd check the syntax once more, if I were you
Similar Messages
-
MS access database prompting for username and password
Hello,
When I try to run a crystal report that is connected to a (Access Database) from crystal server 2013, I get prompted for a username and password. Im not sure what im doing wrong, Ive tried creating a ODBC connection, change the SAP service to run under a domain user account, recreated the report with a different file path. but still no luck, please help im at a lose.
Thank youHello,
Refer please to the following kbas, probably this can help you :
http://service.sap.com/sap/support/notes/1270997
http://service.sap.com/sap/support/notes/1661997
Regards,
Asma -
Access to InitialContext by username and password
hi,
I have implemented a web application, which gets resources via JNDI.
I am accessing JNDI by username and password:
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl");
p.put(Context.PROVIDER_URL, "localhost:50004");
p.put(Context.SECURITY_PRINCIPAL, "username1");
p.put(Context.SECURITY_CREDENTIALS, "password1");
javax.naming.Context ctx = new InitialContext(p);
Accessing the InitialContext works without any problems.
My webapplication provides the functionality, that the user can relogin within the application.
When the user pushes the relogin-button, the following code is run again
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY, guiConfig.getContext_factory());
p.put(Context.PROVIDER_URL, "com.sap.engine.services.jndi.InitialContextFactoryImpl");
p.put(Context.SECURITY_PRINCIPAL, "username2");
p.put(Context.SECURITY_CREDENTIALS, "password2");
javax.naming.Context ctx = new InitialContext(p);
So I would like to check the access to JNDI by username and password again.
Unfortunately I get an InitialContext EVEN WHEN MY PASSWORD IS WRONG.
It looks like InitialContext is not cleared and access to JNDI is not checked by username and password again.
Do I have to clear InitialContext before I relogin to the new InitialContext with the new username and new password; and if yes how can I do that?
Thanks for your help in advance!
Andreas
Message was edited by: Andreas PutscherHi Maksim
I have tried the following source (within my webapplication):
boolean isOldMethod = true;
if (isOldMethod) {
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl");
p.put(Context.PROVIDER_URL, "localhost:50004");
p.put(Context.SECURITY_PRINCIPAL, username);
p.put(Context.SECURITY_CREDENTIALS, password);
ctx = new InitialContext(p);
} else {
ctx = new InitialContext();
ctx.addToEnvironment(Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl");
ctx.addToEnvironment(Context.PROVIDER_URL, "localhost:50004");
ctx.addToEnvironment(Context.SECURITY_PRINCIPAL, username);
ctx.addToEnvironment(Context.SECURITY_CREDENTIALS, password);
Source code within on of my EJBs:
public void setSessionContext(SessionContext context) {
this.context = context;
public UserAuthorization getUserProfile(String userName, String applicationName) throws CasablancaException {
Principal prin = context.getCallerPrincipal();
When I run oldMethod for INITIAL LOGIN and username+password are false,
- immediately an exception is thrown
-> THIS IS CORRECT BEHAVIOUR
When I run newMethod for INITIAL LOGIN and username+password are false,
- no exception is thrown,
- context.getCallerPrincipal() returns "Guest" (I have logged in with user "TESTUSER", who is Adminstrator)
-> WRONG BEHAVIOUR
When I run oldMethod for RELOGIN and username+password are false,
- no exception is thrown
- context.getCallerPrincipal() return the old user (Context HAS NOT CHANGED to new user)
-> WRONG BEHAVIOUR
When I run newMethod for RELOGIN and username+password are false,
- no exception is thrown
- context.getCallerPrincipal() return the old user (Context HAS NOT CHANGED to new user)
-> WRONG BEHAVIOUR
So in both cases (oldMethod and newMethod) no errors are thrown, but no Relogin to JNDI is performed.
Do you have any more suggestions?
Thanks for your help!
Andreas -
4402 guest users authetication via Web (username and password)
Hello Everyone,
We have an issue with Wireless controller model 4402 loaded with 4.0.179.11. This box has stopped authenticating (Layer3 security Web Policy based local usernames and password) last night.
Steps taken to resolve the issue:-
1) Created local usernames and password via Web and tried using wireless through Guest ssid, when user enters this information web page loops back to authentication.
2) Tried authenticating via another Laptop, had no luck.
3) Changed WLAN SSID Guest from Layer3 security Web Policy to Layer2 Security, created Mac filter table for guest on the Controller. Guest was able to connect to the internet.
We have not made any configuration change. As this issue affected all Users, we restarting the controller after which issue was resolved. As per my colleagues this has happened couple of times and every time restart fixes this issue.
Please shed some light on this.
Regards,
MujahidHi Mujahid,
Just to add a note to the great advice from Richard (5 points for your good work on many posts Richard!)
Have a look at these bugs that I'm pretty sure we were hitting with this WLC Version as well;
CSCsi91600 Bug Details
Internet Explorer redirects to login page with webauth due to cache
Symptom:
Client using IE, and web authentication has passed authentication, Policy Manager is in a RUN state, and when the user clicks on the "home" button, or types in the address of their normal homepage, they are continually redirected to the web-auth page
Conditions:
Client using IE, and web authentication has passed authentication, Policy Manager is in a RUN state, and when the user clicks on the "home" button, or types in the address of their normal homepage, they are continually redirected to the web-auth page
Workaround:
Enable IE client to check for newer versions of stored pages on "every visit to the page" option instead of "automatically" (default).
Tools -> Internet Options... -> Temporary Internet files -> Settings... -> Check for newer versions of stored pages: Every visit to the page.
1st Found-In
4.0(179.11)
Fixed-In
4.1(176.6)
4.1(177.0)
4.1(181.0)
4.2(31.0)
4.2(61.0)
Related Bugs
WLC Web-auth homepage leads back to reauth page if redirect URL is used
In a web-auth deployment with or without guest anchoring. If the redirect url is populated, the users homepage will no longer be able to be reached. Whenever the user navigates back to his homepage it will show the reauth page and the user will no longer be able to reach their homepage. Homepage leads back to reauth page if redirect URL populated
CSCse90894 Bug Details
Internet Explorer redirects to login page with webauth due to cache
Even after the commit of CSCse03666 - which added the following line to the
default webauth HTML -
IE 6 continues to redirect its home page back to the webauth login page.
This is due to a known bug in IE.
1st Found-In
4.0(155.5)
Fixed-In
3.2(193.4)
3.2(193.5)
4.0(206.0)
4.1(171.0)
Hope this helps!
Rob -
I can't access sites that require username and password since 4.3 update
Since updating to IOS 4.3, I can't access bookmarked sites that require username and password. I can still get on sites that don't require it. Help please...
Have you tried the standard fix of resetting your iPad?
Press and hold the On/Off Sleep/Wake button and the Home
button at the same time for at least ten seconds, until the Apple logo appears. -
I need to access the library resources for an assignment in college. When I get to the website it asks for my user name and password and once I type that information, it seems like it will load and then it will repeat the user name and password page as if it did not load or say "authentication failed."
* "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
* "Remove the Cookies" from sites causing problems: Tools > Options > Privacy > Cookies: "Show Cookies"
See also [[Cannot log in to websites]] -
Someone please help me figure this out.
Assuming that you are using a recent build of OS X, go to /Applications/Utilities and launch the app called Keychain Access. Go to the Window pulldown menu and select "Keychain First Aid". Enter your password, set the radio button to "Repair", and click "Start".
-
Single sign-on and different usernames and passwords
Hello,
I am building a Portal with WLPS 3.5 and WLS 6.0. I tried to get
information about the background of single sign-on.
I understand, that I need a Realm (i.e. LDAP Realm) to authenticate the
user for the first login to the portal (with username and password).
Now I would like to integrate my webmail-programm (to get emails from
Lotus Notes via Internet) as a portlet.
For my understanding the user has to authorizate to get access to webmail.
Therefore I create a ACL for webmail and this ACL is assigned to my
security Realm.
I would like the portlet to show after login the number of mails for the
specific user. But where are the username and password for webmail stored
and how are they received and forwarded?
I understand that my ACL included all users that have access to webmail
(i.e. all users). But I only want emails for the specific user.
Does WLS get all usernames and passwords while the first login? Do I have to
implement a algorithmen to get the specific username and password for the
requested resource in my portlet?
Has anyone solved a similar problem or can tell me where I can get more
information. I read the WebLogic Security document but I cant find a
answer to my questions.
Thanks
LydiaLydia,
I'm not an expert in this area, but I can give you a start.
As for single sign-on, there are different levels. For single sign-on across web-apps,
the servlet spec requires this (section 12.6 of th 2.3 spec) and therefore Weblogic
does this.
What you are talking about is single sign-on across back-end applications through
a web-app. BEA has partnered with Securant (just acquired by RSA) to provide this
kind of functionality. Browse to http://www.rsasecurity.com/products/ and look
at the ClearTrust product. BEA has also partnered with Netegrity (www.netegrity.com)
with their SiteMinder product. Neither is included in the Weblogic license. I'm
sure either vendor would be excited to explain how their product will solve your
problem if you give them a call.
As for where the username and passwords are stored, that is up to the realm. If
you are using the default WLPS RDBMSRealm, the username and encrypted password
are stored in the WLCS_USER table. If you are using LDAPRealm, they are stored
in your LDAP server.
Hope this was useful!
PJL
[email protected] wrote:
Hello,
I am using PersonalizationServer 3.5 and WLS 6.0 SP 2.
Now I try to unterstand the functionality of Single sign-on when a user
has different usernames and passwords for different applications.
Can someone explain where the usernames and passwords for a user are
stored (all in the LDAP-realm or a RDBMS-realm?) When a user access the
application how username and passwords are mapped? Or usernames and
passwords for all applications are the same and will be equalized?
Precisely I would like to get access to a mail-account for a specific
user
(webmail from Lotus Notes).
Thanks for any help
Lydia -
Getting Pooled Connection with username and password
hi,
I am facing problems in getting pooled connections to MYSQL
database.I am using Tomcat server.
I tried the example given in Tomcat doc "JNDI how to", it
works fine with one set of username and password which is
given in server.xml. Now can anybody guide me thru the steps
to get pooled connections to the same database with multiple
username and passwords.
Thankyou all in advanceNow can anybody guide me thru the steps to get pooled
connections to the same database with multiple
username and passwords.Nope. Can't be done -- at least not that I've seen yet.
Database/JDBC driver vendors seem unconcerned, or don't
care about this scenario. I ragged on Informix years
ago for this very feature. It should would make database
admins jobs a lot easier if they could know "who" that
connection belonged to that is running the outrageous
SQL query without having to divine it by way of tracing
socket/IP connections back thru the network to some machine.
The only way I've seen to do it is to create your own
connection pool code that handles user/password connections.
-- but then the problem becomes you have a collection of
mini-pools for each user. i.e. if you have 200 users, you
end up with 200 connection pools with a couple/few connections
in each sub-pool. Kinda defeats the purpse.
So, apparently, everybody just deals with the single
"generic" user/password connection pool. -
Supplying username and password to repository via code
Hi There,
Is there a way to supply the username and password to the webdav repository via code or in the address line? We have an ActiveX object accessing files and would like to avoid the repository prompting.
ThanksWith Script I can do it as follows.. See VerifyConnection
Option Explicit
Const iTimeOutInSecs = 60
Const ForWriting = 2
Rem ************** MAIN *****************
main
Wscript.quit
Sub Main
Dim WShell, FileSystem
Dim davControl
Dim objArgs, targetPath, serverURL, username, password, rootFolder, filter
Dim fileUploadList, result
Dim folderList, filelist
Dim status
Dim spoolFile
Set wShell = WScript.CreateObject("WScript.Shell")
Set fileSystem = WScript.CreateObject("Scripting.FileSystemObject")
Set spoolFile = fileSystem.OpenTextFile("httpUploadLoad.log", ForWriting, True)
Set objArgs = WScript.Arguments
targetPath = objArgs(0)
serverUrl = objArgs(1)
username = objArgs(2)
password = objArgs(3)
rootFolder = objArgs(4)
If objArgs.length = 6 Then
filter = objArgs(5)
Else
filter = Empty
End If
Set fileUploadList = CreateObject("Msxml2.DOMDocument.4.0")
fileUploadList.async = False
result = fileUploadList.load(targetPath)
If (result = False) Then
MsgBox "Failure while loading or parsing file : " & targetPath,vbCritical
Wscript.quit
End If
Set davControl = new DavControlClass
davControl.setServer serverURL, username, password
davControl.setSpoofile(spoolfile)
status = verifyHttpConnection(davControl, username)
Set folderList = fileUploadList.documentElement.selectNodes("/Upload/directories/directory")
createFolders davControl, rootFolder, folderList, username, password, filter
Set fileList = fileUploadList.documentElement.selectNodes("/Upload/files/file")
uploadFiles davControl, rootFolder, fileList, username, password, filter
spoolfile.close()
End Sub
Function verifyHttpConnection(davControl,username)
Dim status, targetFolder
targetFolder = "/home/" & username
status = davControl.verifyConnection(targetFolder)
verifyHttpConnection = status
End Function
Sub createFolders(davControl, rootFolder, folderList, username, password, filter)
Dim i, targetFolder, targetFolderPath
For i = 0 to folderList.length - 1
Set targetFolder = folderList.item(i)
targetFolderPath = rootFolder & targetFolder.text
If IsNull(filter) or (InStr(targetFolder.text,filter) = 1) Then
'wscript.echo "Making " & targetFolderPath
davControl.makeDir targetFolderPath,true
End If
Next
End Sub
Sub uploadFiles(davControl, rootFolder, fileList, username, password, filter)
Dim i, targetFile, targetFilename, localFilename
For i = 0 to fileList.length - 1
Set targetFile = fileList.item(i)
targetFilename = rootFolder & targetFile.text
localFilename = Right(replace(targetFile.text,"/","\"),Len(targetFile.text)-1)
If IsNull(filter) or (InStr(targetFile.text,filter) = 1) Then
'wscript.echo "Uploading " &localFilename & " as " & targetFilename
davControl.uploadFile localFIlename, targetFileName, "FORCE"
End If
Next
End Sub
Class DavControlClass
Private HTTPUser
Private HTTPPassword
Private HTTPServer
Private installParameters
Private windowsShell
Private XMLHTTP_CLASS_ID
Private HttpObject
Private spoolFile
Dim folderStatusList
Private Sub Class_Initialize()
XMLHTTP_CLASS_ID = "Msxml2.XMLHTTP.6.0"
Set HttpObject = CreateObject(XMLHTTP_CLASS_ID)
folderStatusList = Empty
End Sub
Public Sub setSpoofile(file)
Set spoolFile = file
End Sub
Public Sub setParameters(wshell, params)
Set installParameters = params
Set windowsShell = wShell
setServer params.getServerURL(), params.getUser(), params.getPassword()
End Sub
Public Sub setServer(serverURL,serverUser,serverPassword)
HTTPServer = serverURL
HTTPUser = serverUser
HTTPPassword = serverPassword
End Sub
Public Function getServerURL
getServerURL= HTTPServer
End Function
Public Function verifyConnection(target)
On Error Resume Next
HttpObject.Open "HEAD", HTTPServer & target, false, HTTPUser, HTTPPassword
If Err.Number <> 0 Then
WScript.echo "verifyConnection() - Fatal Error encountered accessing : " & HTTPServer & target & ". Status (" & Hex(Err.number) & ") " & Err.Description
Wscript.quit
End If
On Error GoTo 0
HttpObject.setRequestHeader "Content-type", "text/xml"
HttpObject.setRequestHeader "Depth", "1"
On Error Resume Next
HttpObject.send ("")
If Err.Number <> 0 Then
WScript.echo "resetConnection() - Fatal Error encountered accessing : " & HTTPServer & target & ". Status (" & Hex(Err.number) & ") " & Err.Description
Wscript.quit
End If
On Error GoTo 0
If HTTPObject.status <> 200 Then
MsgBox "Unable to access " & getServerURL() & target & ". HTTP Status = " & HTTPObject.status & ". Please correct installParameters.xml and restart Installation",vbCritical
Wscript.quit
End If
spoolfile.writeline "HTTP Successfully Connected to '" & getServerURL() & target
verifyConnection = HTTPObject.status
End Function
Public Function uploadFile (local, remote, mode)
Dim returnCode, rc
returnCode = doHead(remote)
If returnCode = 401 Then
MsgBox "uploadFile() - Unauthorized (Status (" & returnCode & "). Unable to upload '" & local & "' into '" & remote & "'. Please check installParameters.xml and log files.",vbCritical
Wscript.quit
End If
If returnCode = 200 Then
If mode = "ERROR" Then
MsgBox "uploadFile() - Installation Failed. Resource Exists : '" & remote & "'. Please check installParameters.xml and restart Installation",vbCritical
Wscript.quit
End If
If mode = "SKIP" Then
uploadFile = returnCode
Exit Function
End If
If mode = "FORCE" Then
rc = doDelete(remote)
End If
End If
uploadFile = doPut (local, remote, null)
If uploadFile = 500 Then
MsgBox "UploadFile() - Upload Failed (Status (" & uploadFile & "). Unable to upload '" & local & "' into '" & remote & "'. Retry in Progress.",vbCritical
uploadFile = doPut (local, remote, null, user, password)
If uploadFile = 500 Then
MsgBox "UploadFile() - Installation Failed (Status (" & uploadFile & "). Unable to upload '" & local & "' into '" & remote & "'. Please check installParameters.xml and log files.",vbCritical
Wscript.quit
End If
End If
If uploadFile = 401 Then
MsgBox "UploadFile() - Unauthorized (Status (" & uploadFile & "). Unable to upload '" & local & "' into '" & remote & "'. Please check installParameters.xml and log files.",vbCritical
Wscript.quit
End If
End Function
Public Function makeDir(targetFolder,force)
Dim Status, ParentFolder
status = doHEAD(targetFolder)
If not IsEmpty(folderStatusList) Then
folderStatusList.add targetFolder, status
End If
If (status = 404 or status = 409) and force Then
parentFolder = Mid(targetFolder,1,InStrRev(targetFolder,"/")-1)
makeDir parentFolder,true
status = doMKCOL(targetFolder)
End If
makeDir = status
If status = 401 Then
MsgBox "doMKCOL() - Unauthorized (Status (" & status & "). Unable to create '" & targetFolder & "'. Please check installParameters.xml and log files.",vbCritical
Wscript.quit
End If
End Function
Public Function doHEAD(remote)
' Dim HttpObject
' Set HttpObject = CreateObject(XMLHTTP_CLASS_ID)
' HttpObject.Open "HEAD", HTTPServer & remote, false, user, password
HttpObject.Open "HEAD", HTTPServer & remote, false
HttpObject.setRequestHeader "Content-type", "text/xml"
HttpObject.setRequestHeader "Depth", "1"
On Error Resume Next
HttpObject.send ("")
If Err.Number <> 0 Then
WScript.echo "doHEAD() - Fatal Error encountered accessing : " & HTTPServer & remote & ". Status (" & Hex(Err.number) & ") " & Err.Description
Wscript.quit
End If
On Error GoTo 0
doHead = HttpObject.status
End Function
Public Function doPUT(local,remote,contentType)
Dim tmStart
Dim tmCurr
Dim iTimeTaken
Dim currentStatus
Dim ado_stream
Dim uploadCount, uploadStatus
Set ado_stream = CreateObject("ADODB.Stream")
ado_stream.Type = 1
ado_stream.Open()
On Error Resume Next
ado_stream.LoadFromFile(local)
If Err.Number <> 0 Then
WScript.echo "doPUT() - Fatal Error encountered reading File : " & local & ". Status (" & Hex(Err.number) & ") " & Err.Description
Wscript.quit
End If
On Error GoTo 0
HttpObject.Open "PUT", HTTPServer & remote, false
If not IsNull(contentType) Then
HttpObject.setRequestHeader "Content-type", contentType
End If
tmStart = Now
On Error Resume Next
HTTPObject.send(ado_stream.Read(-1))
If Err.number <> 0 Then
' Unexpected errors can occur as a result of the HTTP request being passed to wrong database instance
' when multiple databases are using the same listener.
WScript.echo "doPUT() - Fatal Error encountered uploading File : " & local & ". Status (" & Hex(Err.number) & ") " & Err.Description
WScript.quit
Else
currentStatus = HTTPObject.status
End If
On Error GoTo 0
uploadCount = 1
uploadStatus = doHead(remote)
Do While uploadStatus <> 200 and uploadCount < 6
' Unexpected errors can occur as a result of the HTTP request being passed to wrong database instance
' when multiple databases are using the same listener.
spoolfile.writeline "Http Error encountered uploading " & local & " to " & HTTPServer & remote &". Status=" & currentStatus
currentStatus = retryPUT(local,remote,contentType)
uploadCount = uploadCount + 1
uploadStatus = doHead(remote)
Loop
If uploadStatus = 200 Then
tmCurr = Now
spoolFile.writeLine "Uploaded File " & local & ". Elapsed Time = " & CInt(DateDiff("s", tmStart, tmCurr)) & " seconds."
Else
WScript.echo "doPUT - Fatal Error uploading file (" & HTTPServer & remote & ") : Status=" & HTTPObject.status
WScript.quit
End If
doPut = currentStatus
ado_stream.Close()
End Function
Public Function retryPUT(local,remote,contentType)
Dim ado_stream
Set ado_stream = CreateObject("ADODB.Stream")
ado_stream.Type = 1
ado_stream.Open()
On Error Resume Next
ado_stream.LoadFromFile(local)
If Err.number <> 0 Then
WScript.echo "doPUT() - Fatal Error encountered reading File : " & local & ". Status (" & Hex(Err.number) & ") " & Err.Description
Wscript.quit
End If
On Error GoTo 0
HttpObject.Open "PUT", HTTPServer & remote, true
If not IsNull(contentType) Then
HttpObject.setRequestHeader "Content-type", contentType
End If
On Error Resume Next
HTTPObject.send(ado_stream.Read(-1))
If Err.Number <> 0 Then
ado_stream.Close()
WScript.echo "doPUT() - Fatal Error encountered sending File : " & local & " to " & HTTPServer & remote &". Status (" & Hex(Err.number) & ") " & Err.Description & ". Retrying ...."
Wscript.quit
Else
Do While HTTPObject.readyState <> 4
WScript.Sleep(1000)
Loop
End If
On Error GoTo 0
ado_stream.Close()
retryPut = HTTPObject.status
End Function
Public Function doMKCOL(remote)
' wscript.echo "doMKCOL (" & HTTPServer & remote & ")"
Dim currentStatus
HttpObject.Open "MKCOL", HTTPServer & remote, false
HttpObject.setRequestHeader "Content-type", "text/xml"
On Error Resume Next
HttpObject.send("")
If Err.Number <> 0 Then
WScript.echo "doMKCOL() - Fatal Error encountered making Folder : " & HTTPServer & remote &". Status (" & Hex(Err.number) & ") " & Err.Description
Wscript.quit
End If
On Error GoTo 0
If HTTPObject.status <> 201 Then
WScript.echo "doMKCOL() - Fatal Error encountered making Folder : " & HTTPServer & remote &". Status (" & HTTPObject.status & ")."
Wscript.quit
End If
doMKCOL = HTTPObject.status
End Function
Public Function doDELETE(remote)
HttpObject.Open "DELETE", HTTPServer & remote, false
HttpObject.setRequestHeader "Content-type", "text/xml"
On Error Resume Next
HttpObject.send("")
If Err.Number <> 0 Then
WScript.echo "doMKCOL() - Fatal Error deleting : " & HTTPServer & remote &". Status (" & Hex(Err.number) & ") " & Err.Description
Wscript.quit
End If
On Error GoTo 0
doDELETE = HTTPObject.status
If HTTPObject.status <> 201 and HTTPObject.status <> 204 and HTTPObject.status <> 207 and HTTPObject.status <> 404 Then
wscript.echo "doDELETE (" & HTTPServer & remote & ") : Status=" & HTTPObject.status
End If
End Function
End Class -
Username and password with Access and JDBC application
Hello all,
I have written an application which accesses a MS Access database. I have created a dialog which asks the user for a username and password. I then include the username and password to connect to the database. I have created groups and users in the Access database and have given each user different privaleges. However, when I run my application, any user can get any privelage. I am missing something. Thanks in advance.// ConnectToDatabase.java
// Copyleft (c) 2001 RatKing
// ��������������������������������Java Bean
// E-mail: [email protected]
// This can use in JSP or Java Application or Applet
// AFTER you have setup the ODBC source in Windoz.
package rat;
import java.sql.*;
import java.util.*;
public class ConnectToDatabase{
private String driverClass = "sun.jdbc.odbc.JdbcOdbcDriver"; // JDBC-ODBC Bridge Driver
private String dbURL = "jdbc:odbc:yourdbname"; // the name of your ODBC Source's Database
private String userName = "yourname"; // user ID
private String password = "yourpassword"; // user password
private Connection connection = null; // Connection to the Database
private Statement statement = null; // Statement object
public ConnectToDatabase () {
// ������������������
public Connection getConnection() throws ClassNotFoundException, SQLException {
if(connection != null) {
return connection;
Class.forName(driverClass);
connection = DriverManager.getConnection(dbURL, userName, password);
return connection;
} // getConnection()
public void closeConnection() throws SQLException {
if (connection != null) {
// Makes all changes made since the previous commit/rollback permanent
// and releases any database locks currently held by this Connection object.
if (!connection.getAutoCommit())
connection.commit();
closeStatement();
connection.close();
connection = null;
} // closeConnection()
* If not connected to database...connect to database, create a statement,
* and, return the Statement.
protected void createStatement() throws SQLException, Exception {
if(statement == null) {
Connection connection = getConnection();
statement = connection.createStatement();
* This method executes a statement and returns true or false. Any type
* of Statement may be executed by this command.
public boolean execute(String sqlString) throws SQLException, Exception {
if(statement == null){
createStatement();
boolean returnValue = statement.execute(sqlString);
return returnValue;
* This method executes the statement and returns a ResultSet from
* execution of the query. Only a SELECT Statemet is applicable here.
public ResultSet executeQuery(String sqlString) throws SQLException, Exception {
if(statement == null){
createStatement();
ResultSet rs = statement.executeQuery(sqlString);
return rs;
* This method executes update statements and returns a count of
* the updates. Only a INSERTS, DELETES, and UPDATES are applicable here.
* In addition, SQL statements that return nothing such as SQL DDL statements
* can be executed.
public int executeUpdate(String sqlString) throws SQLException, Exception {
if(statement == null){
createStatement();
int returnValue = statement.executeUpdate(sqlString);
return returnValue;
* This method closes the Statement.
public void closeStatement() throws SQLException {
if(statement != null){
statement.close();
statement = null;
* If it is not connected to database, connect to database and
* create a statement and returns the Statement
* @param scrollType should be ResultSet.TYPE_FORWARD_ONLY
* or ResultSet.TYPE_SCROLL_INSENSITIVE
* or ResultSet.TYPE_SCROLL_SENSITIVE
* @param updateType should be ResultSet.CONCUR_READ_ONLY or
* ResultSet.CONCUR_UPDATABLE ;
protected Statement getStatement(int scrollType, int updateType)
throws SQLException, Exception {
Connection connection = getConnection();
// for cloudscape to work with scrollable resultsets, the autocommit
// should be false.
connection.setAutoCommit(false);
Statement statement = connection.createStatement(scrollType,
updateType);
return statement;
* If it is not connected to database, connect to database and
* create a preparestatement and returns the Statement
* @param sqlString queryString to make a statement
* @param scrollType should be ResultSet.TYPE_FORWARD_ONLY
* or ResultSet.TYPE_SCROLL_INSENSITIVE
* or ResultSet.TYPE_SCROLL_SENSITIVE
* @param updateType should be ResultSet.CONCUR_READ_ONLY or
* ResultSet.CONCUR_UPDATABLE ;
protected PreparedStatement getStatement(String sqlString,
int scrollType,
int updateType) throws SQLException,
Exception {
Connection connection = getConnection();
// for cloudscape to work with scrollable resultsets, the autocommit
// should be false.
connection.setAutoCommit(false);
PreparedStatement preparedStatement =
connection.prepareStatement(sqlString, scrollType, updateType);
return preparedStatement;
* this method executes the statement and resuts the resultSet due to
* execution of Statement.
* only SELECT Statemet is applied here.
public ResultSet executeQueryScrollInsensitiveReadOnly(String sqlString,
Vector values) throws SQLException, Exception {
PreparedStatement preparedStatement = getStatement(sqlString,
ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY);
for (int i = 1; i <= values.size(); i++) {
preparedStatement.setObject(i, values.elementAt(i - 1));
// Execute a SQL statement that returns a single ResultSet.
ResultSet rs = preparedStatement.executeQuery();
return rs;
* this method executes the statement and resuts the resultSet due to
* execution of Statement. only SELECT Statemet is applied here.
public ResultSet executeQueryScrollInsensitiveReadOnly(String sqlString)
throws SQLException, Exception {
Statement statement = getStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY);
// Execute a SQL statement that returns a single ResultSet.
ResultSet rs = statement.executeQuery(sqlString);
return rs;
* this method executes the statement and returns the resultSet due to execution
* of Statement. only SELECT Statemet is applied here.
public ResultSet executeQueryScrollForwardOnly(String sqlString,
Vector values) throws SQLException, Exception {
PreparedStatement preparedStatement = getStatement(sqlString,
ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
for (int i = 1; i <= values.size(); i++) {
preparedStatement.setObject(i, values.elementAt(i - 1));
// Execute a SQL statement that returns a single ResultSet.
ResultSet rs = preparedStatement.executeQuery();
return rs;
* this method executes the statement and returns the resultSet due to
* execution of Statement. only SELECT Statemet is applied here.
public ResultSet executeQueryScrollForwardOnly(String sqlString)
throws SQLException, Exception {
Statement statement = getStatement(ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_READ_ONLY);
// Execute a SQL statement that returns a single ResultSet.
ResultSet rs = statement.executeQuery(sqlString);
return rs;
* Method executeQueryScrollSensitiveReadOnly
* @param sqlString String
* @param values Vector
* @return ResultSet returns ResultSet due to statement execution
* @throws Exception
* @throws SQLException
* @see
public ResultSet executeQueryScrollSensitiveReadOnly(String sqlString,
Vector values) throws SQLException, Exception {
PreparedStatement preparedStatement = getStatement(sqlString,
ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
for (int i = 1; i <= values.size(); i++) {
preparedStatement.setObject(i, values.elementAt(i - 1));
// Execute a SQL statement that returns a single ResultSet.
ResultSet rs = preparedStatement.executeQuery();
return rs;
* Method executeQueryScrollSensitiveReadOnly
* @param sqlString
* @return
* @throws Exception
* @throws SQLException
* @see
public ResultSet executeQueryScrollSensitiveReadOnly(String sqlString) throws SQLException, Exception {
Statement statement = getStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_READ_ONLY);
// Execute a SQL statement that returns a single ResultSet.
ResultSet rs = statement.executeQuery(sqlString);
return rs;
//////////////Other things maybe useful ///////////////////
# Refer to Appendix A for more info on configuring the JDBC
# driver via setting of the DRIVER_CLASS and DATABASE_URL properties
#JDBC Driver Class
# for ODBC Driver:
#DRIVER_CLASS=sun.jdbc.odbc.JdbcOdbcDriver
# for Oracle Driver
#DRIVER_CLASS=jdbc.oracle.driver.OracleDriver
# for CloudScape Driver equipped with J2EE reference implementation
#DRIVER_CLASS=RmiJdbc.RJDriver
# for CloudScape Driver equipped with BEA Weblogic Server
DRIVER_CLASS=COM.cloudscape.core.JDBCDriver
#Database URL
# for ODBC URL
#DATABASE_URL=jdbc:odbc:tShirts
# for Oracle URL
#DATABASE_URL=jdbc:oracle:thin:@localhost:1521:ORCL
# for URL with CloudScape equipped with J2EE reference implementation
#DATABASE_URL=jdbc:rmi:jdbc:cloudscape:beeshirtsdb
# for URL with CloudScape equipped with BEA Weblogic Server
DATABASE_URL=jdbc:cloudscape:D:\\weblogic\\eval\\cloudscape\\beeshirts
#UserName to connect to database
UserName=TSHIRTS
#Password to connect to database
Password=TSHIRTS
#otherParameters
SUB_PROPERTIES=
#SQL Query
SQL_QUERY_STATEMENT = SELECT * FROM TSHIRTS.CUSTOMER
#SQL Update , if you run this program please change the id 129 to different value each time
SQL_UPDATE_STATEMENT = INSERT INTO TSHIRTS.CUSTOMER VALUES ('129','Sam','Cheng','S','123 Sam St.', 'C3','Baltimore','MD','20222','4104444444' ,'[email protected]')
#Join STATEMENT
SQL_QUERY_STATEMENT_JOIN = SELECT TSHIRTS.CUSTOMER.*, TSHIRTS.ORDERS.* FROM TSHIRTS.CUSTOMER, TSHIRTS.ORDERS WHERE CUSTOMER.CUSTOMER_ID = ORDERS.CUSTOMER_ID_FK
#OUTER JOIN for ORACLE
#SQL_QUERY_STATEMENT_OUTER_JOIN = SELECT CUSTOMER.* FROM TSHIRTS.CUSTOMER,STATE WHERE CUSTOMER.STATE(+) = STATE.CODE(+)
#OUTER JOIN for MSACCESS
#SQL_QUERY_STATEMENT_OUTER_JOIN = SELECT C.* , S.* FROM CUSTOMER C OUTER JOIN STATE S on C.STATE = S.CODE
#OUTER JOIN for MSACCESS and Cloudscape
SQL_QUERY_STATEMENT_OUTER_JOIN = SELECT C.* , S.* FROM TSHIRTS.CUSTOMER C LEFT OUTER JOIN TSHIRTS.STATE S on C.STATE = S.CODE
#SQL Statement with Like for MSACCESS
#SQL_QUERY_STATEMENT_WITH_LIKE = SELECT CUSTOMER.* FROM CUSTOMER WHERE CUSTOMER.FIRST_NAME LIKE \'*R*\'
#SQL Statement with Like for ORACLE and Cloudscape
SQL_QUERY_STATEMENT_WITH_LIKE = SELECT * FROM TSHIRTS.CUSTOMER WHERE FIRST_NAME LIKE '%R%'
#Prepared QUERY Statement
PREPARED_SQL_QUERY_STATEMENT = SELECT * FROM TSHIRTS.CUSTOMER WHERE FIRST_NAME = ?
PREPARED_SQL_QUERY_STATEMENT_VALUES = Roy
#Prepared Insert
PREPARED_SQL_INSERT_STATEMENT = INSERT INTO TSHIRTS.CUSTOMER VALUES(?,?,?,?,?,?,?,?,?,?,?)
PREPARED_SQL_INSERT_STATEMENT_VALUES =130,John,Hiller,Miller,125 S St.,C6,Baltimore,MD,20100,4104444444,[email protected]
#Prepared Update
PREPARED_SQL_UPDATE_STATEMENT = UPDATE TSHIRTS.STATE SET STATE_NAME = 'California' WHERE CODE = ?
PREPARED_SQL_UPDATE_STATEMENT_VALUES =CA
#Data base schema name
SCHEMA_NAME =TSHIRTS -
Browser prompting for username and password to access enterprise manager.
I've just installed Internet Directory 10.1.4.0.1 and am having trouble connecting to Application Server Console in Enterprise Manager.
When I try to go to the url http://localhost:18101, a dialog pops up asking for a username and password. In firefox it says 'Enter username and password for "enterprise-manager" at http://localhost:18101'. IE6 just says, 'enterprise-manager'. I have tried various sets of credentials for this - my network userid and password; and ias_admin, orcladmin, sys and sysman, all with the passwords I specified at install time. None of these work. If I cancel the dialog box I get a '401 Unauthorised' page. I'm sure this is coming from apache and is basic web page authentication, and not an enterprise manager login.
Has any one seen this before?
I can connect through directory manager, and I can connect to the database console for the metadata repository.
emctl status iasconsole shows that it is running.
Windows XP Pro SP2 standalone (ie not part of a windows domain)trying to access my college intranet form home
Contact your college network support. The syntax for specifying your authentication may be different than you usually use when you are just connecting there locally.
Robert Aldwinckle -
Changed icloud username and password can't access other devices
I have three devices from which I use the same iTunes and ICloud account. I changed my username and password on the accounts yesterday. Now I am only able to get it to work on my IPhone 5S. My daughter's IPhone 4 and my IPad will not accept the new passwords. I can't access FaceTime or IMessage on those devices as it keeps prompting me that it is incorrect and to reset. If I reset, it won't work on my IPhone 5S. Help!
Welcome to the Apple community.
If you mean that Find My Phone is asking for a password to a different Apple ID to your current Apple ID and that ID is a previous version of your current ID, not an entirely different one.
This feature has been introduced to make stolen phones useless to those that have stolen them.
However it can also arise when the user has changed their Apple ID details with Apple and not made the same changes to their iCloud account/Find My Phone on their device before upgrading to iOS 7, or if you restore from a previous back up made before you changed your details and some other circumstances.
The only solution is to change your Apple ID back to its previous state with Apple at My Apple ID using your current password, you don’t need access to this address if it’s previously been used with your Apple ID, once you have saved these details enter the password as requested on your device and then turn off "find my phone" and delete the account from your device. It may take a short while to remove the account.
You should then change your Apple ID back to its current state, save it once again and then log back in using your current Apple ID. Finally, turn "find my phone" back on once again.
This article provides more information about Activation Lock.
This is answer is provided from my own database of boilerplate responses and the content was last reviewed and tested on: 2014/05/23 -
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.
FarbodHi 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 -
HT5439 i can't access my university anyway, how can i add username and password?
i try to use this solution to apply my university proxy, but it dodn't work. Can u suggest me more about how can i add username and password?
You should be able to use the OpenVPN Connect app running on your iPad to connect your iPad to the VPN directly. It is an official OpenVPN client for iOS devices.
In what way is it "not compatible"? Have you tried it? Tunnelblick is an OpenVPN client, so your school's VPN is using the OpenVPN protocol. That means any OpenVPN client should be able to access it. (It is possible, but unlikely, that your school uses encryption that is not available on the iPad, but that would be very unusual.)
Otherwise, a remote control app on your iPad would let you control your Mac at home. "Back to My Mac", for example, would allow you to control your Mac remotely. The tricky part of this is that usually a VPN is set up to send all Internet traffic via the VPN server, and I'm not sure how that would work with "Back to My Mac".
Maybe you are looking for
-
How to tranfert application data from a ipod to another
how can i easely transfert my game data from an ipod touch to an ipad mini. I want to play on one and next day play with the other one and continue my game without loosing my work. I don't want to restore all the configuration each time i change devi
-
Can't Left Click in Flash Player Settings Panel - HELP PLEASE
Hi and thanks for taking the time to read this. Believe me it is a fraction of the time I have wasted trying to resolve this issue. Basic problem is: I am trying to stream to Ustream but since downloading AFP11 for my Windows PC when I open the Flash
-
Bandwidth monitoring on a Catalyst 2960
Hello all, I'm working with two Catalyst 2960 switches and I would like to know if there is a way to monitor bandwidth on individual ports. Ideally I would like to have one graph showing a bandwidth usage reading on each port. I tried using the Netwo
-
Request 0 of type 38 failed with server error - but it worked anyway
I'm trying to modify the rights that a certain group has on a certain folder. When I modify the rights (in Assign Security in the CMC) and click OK, I get the error: An error occurred at the server during security batch commit: Request 0 of type 38
-
Older mov clips playback choppy in Premiere CC 2014
Revisiting an old project (two years or so) and much of my footage is playing back choppy in Premiere. It is some clips but not all. I played with sequence frame rates to see if there was a mis-match but nothing helped. I'm noticing it happen in quic