How to get the ORIGINAL logged in user [duplicate] - vbscript

This question already has answers here:
How to get usernames with VBScript
(4 answers)
Find User Logged on to a Remote Computer
(1 answer)
Closed 4 years ago.
We have a VBScript that pulls the username from HKCU\Volatile Environment\USERNAME. This is great except when running the script as an admin. Then this value changes to the admin username.
Where/how can I get the ORIGINAL username that was logged in? I can't get it from HKEY_CURRENT_USER because the ADMIN account get swapped in from HKEY_USERS.

I found it. I KNEW that the registry had to be hiding the last logged in user somewhere!
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\ LastLoggedOnUser = ".\crewr"
Pull that string and just
replace( returnedRegString, ".\", "" )
and you're golden!

Related

ORA-65096: invalid common user or role name - create role [duplicate]

This question already has answers here:
error: ORA-65096: invalid common user or role name in Oracle database
(12 answers)
Closed last year.
I am trying to run the query - 'create role warehouse_user identified globally'
by JDBC (Dbeaver)
get error:
ORA-65096: invalid common user or role name
I am running this by remote connection (automation).
some ideas why this is not working?
You might be trying to run this under CDB.
You can go for connecting targeted PDB and then try it should work.
If you want to create a role under CBD please try with c## in the name prefix.
and another way is not recommended but you can go for alter session set "_oracle_script"=true; to take username/role name without prefix.

How to Get in Rest API using VBS [duplicate]

This question already has answers here:
HTTP GET in VBS
(4 answers)
Closed 1 year ago.
Long time lurker.. first time poster..
I'm fairly proficient with PowerShell. However, I have a requirement to use a get response to a rest API using VBS and I'm completely out of my depths.
Normally using the following in PowerShell would return me a string for a just in time password.
Invoke-RestMethod "https://domain/password" -UseDefaultCredentials
I'm attempting to do the same method in VBS but I believe my issue is to do with passing through the credentials. Everything I've tried has failed me and I can't find any relatable KBs
How can I do a API call in VBS?
I solved this by using curl with a --ntlm switch
curl.exe --ntlm -u : -sX GET ""https://domain/password""

Error 404 on photo after getting via details [duplicate]

This question already has an answer here:
Google Place Photo API returning 404
(1 answer)
Closed 5 years ago.
When making a call to https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJyWEHuEmuEmsRm9hTkapTCrk with my key, a got a correct response. It gives me photos and photo reference. But when searching for the photo, I got a 404 message. I'm doing a search on https://maps.googleapis.com/maps/api/place/photo?maxwidth=400&photoreference=CmRZAAAAaCHi7iCO7RowcwbEF5dg_QUG3lNW6fr7F_tVLIQ2cy2agD3lvWH2Bms_pvet71mxz7CZaSm3zud8sjPIxN7RrD-pbDHQ6P24yMQS2vJnDFOMHTWx2GowZoQ2GnoAFHU4EhDbUH2QDrCIVXT7JgXg-Ck9GhSlBLEcxhUM7Ewl6LP9cnh4_YYZSQ for instance (with key). The photo reference is what I got from the above search.
Anything I'm doing wrong? Or could it be a Google caching problem?
I think this is because the response is not json try removing it:
https://maps.googleapis.com/maps/api/place/photo?maxwidth=400&photoreference=CmRZAAAAaCHi7iCO7RowcwbEF5dg_QUG3lNW6fr7F_tVLIQ2cy2agD3lvWH2Bms_pvet71mxz7CZaSm3zud8sjPIxN7RrD-pbDHQ6P24yMQS2vJnDFOMHTWx2GowZoQ2GnoAFHU4EhDbUH2QDrCIVXT7JgXg-Ck9GhSlBLEcxhUM7Ewl6LP9cnh4_YYZSQ&key=yourkey
I believe there is an issue with a few of the google sources but it may be related to the placeId you are dealing with. The only difference I have noticed is that 404 are returned when hitting this server https://lh5.googleusercontent.com and photos are returned when hitting this server https://lh4.googleusercontent.com.
For example, I had success with this placeId - ChIJWTLw5D17NYgR0WSz74Ble5s

Oracle APEX 5 Mange users and developers Error

Hi Everyone this is my first question... its taken 4 years for me not to find the answer through others questions and google.
I am new to Oracle APEX 5 and administrating ORACLE APEX 5 for our DEV, System TEST and OQ environments and the DEV and ST environments have started producing this error when I try and click on a user to configure their passwords or changed their accounts to unlocked. I am using the ADMIN account which worked last month when I went in to reset a password for a developer. The error is below (I would rather have posted a screenshot but I am unable to as its my first question)
Internal Error Contact your administrator. Details about this incident are available via debug id "6818".
Can anyone tell me why this is happening and where to find the debug log or how to fix the problem?
Many thanks
Regards,
Helen.
This is an unhandled exception. We'd need to get the details of this exception to understand the problem better.
To find the details, you can either connect as SYS or SYSTEM (or someone granted the APEX_ADMINISTRATOR_ROLE database role) and run the following query:
select *
from apex_debug_messages
where page_view_id = 6818
order by message_timestamp asc;
By the way, this was so poorly documented, I decided to author a quick blog post about it. Thanks for the inspiration!
Joel
Thank-you for your reply
I got a few rows back from the query the one the sparked my interest is the following
ORA-01841: (full) year must be between -4713 and +9999, and not be 0
I updated the admin password in previous months to not expire as this is not needed.. The password still expires though even with this set to no. So I entered 99999 as a way to bypass this. I just change the days to within the range requested above and the page now displays. Very silly mistake on my side in the end! Thank-you for the info as it is a great help to know where these DE-BUG ID's are stored

Joomla 2.5. - Setup stuck on configuration step 6 [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am trying to setup joomla on a shared windows 2008 server. PHP version is 5.2 FastCGI. As per joomla pre-installation check the host meets all the requirements. But setup gets stuck on the step 6 (configuration). It is just showing the progress update, but not doing anything.
Found a solution at this link http://forum.joomla.org/viewtopic.php?f=623&t=581196
Edited: Here is the solution posted #joomla.org forum. All credit goes to rickpowers01
You all seem to be on the right track but not very clear. Here is what I did when the installer stalled at step 6. First, understand what the installer is trying to do: It is composing a file called configuration.php that must reside at your site root. It fails because your ISP setup does not let your web user write to the httpdocs directory.
The good news is that you can create and edit this file locally and upload it through FTP or the Plesk File Manager. To create it locally unzip the installation package and copy the file called configuration.php-dist to configuration.php. Open it with a free text editor and edit the following parameters:
public $dbtype = 'mysql'; // Normally mysql
public $host = 'yourdomain.com'; // This is normally set to localhost - no! - put in your real domain name
public $user = 'root'; // MySQL username - whatever you entered on the installer dialog step 4
public $password = 'your db password'; // MySQL password - whatever you entered on the installer dialog step 4
public $db = 'your db name'; // MySQL database name -whatever you entered on the installer dialog step 4
public $dbprefix = 'xxxx_'; // Do not change unless you need to! -whatever you entered on the installer dialog step 4
Save and upload the file to the root of your website. Remove the installation directory. Try yourdomain/administrator and you should get the login. If you get SQL errors then check your db parameters with the phpadmin tool on plesk. Redit configuration.php and reupload.
If you got to step 6 then the database should have been created and these parameters should be what you put into the database creation dialogue. If this doesnt work then check that the database exists and and table names start with the prefix etc.

Resources