2021-05-17

Review Who is Connected to Windows Shared Folder

 

1. Open Computer Management Console

    Windows Key + R -> compmgmt.msc

    



2. Expand System Tools -> Shared Folder -> Sessions

    

3. You would see which user is/are connecting Windows Shared Folder


2021-04-19

LDAP: error code 53 - Password Policy Error :9001: cn=orcladmin : Your account is locked

 Solution:

Use the oidpasswd utility in $ORACLE_HOME/bin to unlock the account:

    oidpasswd connect=oiddb unlock_su_acct=true
    OID DB user password:
    OID super user account unlocked successfully.


 Reference: Oracle Support Doc ID 251354.1

2020-10-16

Java Keystore - keytool commands

 1.  List Trusted cacerts

    keytool -list -v -keystore $JAVA_HOME/jre/lib/security/cacerts


2. Import New cert into keystore (e.g. Amazon)

keytool -import -trustcacerts -file [filename] -alias [alias] -keystore $JAVA_HOME/jre/lib/security/cacerts 

->

keytool -import -trustcacerts -file AmazonRootCA1.cer -alias AmazonRootCA1 -keystore $JAVA_HOME/jre/lib/security/cacerts

3. Delete cert from keystore

keytool -delete -alias [alias] -keystore $JAVA_HOME/jre/lib/security/cacerts 

Ref: https://www.sslshopper.com/article-most-common-java-keytool-keystore-commands.html

2020-10-15

Execute from symbolic link

Method One: link in /sbin
sudo ln -s /[directory]/[script].[extension] /sbin/[alias]

2019-02-26

Some Programs Cannot Access Network Locations

Configure the EnableLinkedConnections registry value. This value enables Windows Vista and Windows 7 to share network connections between the filtered access token and the full administrator access token for a member of the Administrators group. After you configure this registry value, LSA checks whether there is another access token that is associated with the current user session if a network resource is mapped to an access token. If LSA determines that there is a linked access token, it adds the network share to the linked location.

To configure the EnableLinkedConnections registry value

  1. Click Start, type regedit in the Start programs and files box, and then press ENTER.
  2. Locate and then right-click the registry subkey HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System.
  3. Point to New, and then click DWORD Value.
  4. Type EnableLinkedConnections, and then press ENTER.
  5. Right-click EnableLinkedConnections, and then click Modify.
  6. In the Value data box, type 1, and then click OK.
  7. Exit Registry Editor, and then restart the computer.
Refer: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/ee844140(v=ws.10)

2018-07-13

ORA-02391: exceeded simultaneous SESSIONS_PER_USER limit

1. Check how many sessions were existed:

SELECT count(*) as connections, username 
FROM   v$session 
GROUP  BY username 

ORDER  BY username; 


2. Check SESSIONS_PER_USER for the user: (example username: THONY)

SELECT a.username, b.profile, b.resource_name, b.limit 
FROM dba_users a , dba_profiles b 
WHERE a.profile=b.profile AND b.resource_name='SESSIONS_PER_USER' AND a.username='THONY';


3. Alter SESSIONS_PER_USER value: (example profile: DEFAULT)

ALTER PROFILE default LIMIT SESSIONS_PER_USER 10;

2016-10-07

Windows 複製檔案時保留權限

xcopy c:\source_folder_name d:\destination_folder_name /E /H /K /O /X

    /E - Copies folders and subfolders, including empty ones.
    /H - Copies hidden and system files also.
    /K - Copies attributes. Typically, Xcopy resets read-only attributes.
    /O - Copies file ownership and ACL information.
    /X - Copies file audit settings (implies /O).

2016-06-08

STMP Relay Test

1. Telnet <HOSTNAME> <PORT NO>
2. mail from: <Sender Email Address>
3. rcpt to: <Receiver Email Address>
4.  data
5. FROM: <Sender Email Address>
6. Subject: <Email Subject>
7. <Email Content>
8. input "." to send

2016-01-19

Oracle SQL Developer Default Script Path


How to define the script path to run SQL via text file?

Tools --> Preferences --> Database --> Worksheet -->
Select default path to look for scripts



2015-02-13

檢查Windows網絡硬碟使用哪個帳戶登記

The following command for checking Windows network drive used which account to map

wmic netuse where LocalName="Z:" get UserName /value

2014-09-24

查找LINUX 版本, KERNEL 版本

Check the Linux Version, Release name and Kernel version

  • uname -a (Print all Information)
  • uname -r (Print the kernel name)
  • uname -m
  • cat /proc/version
  • cat /etc/issue
  • cat /etc/redhat-release
  • lsb_release –a
  • tail /etc/redhat-release

Review Who is Connected to Windows Shared Folder

  1. Open Computer Management Console     Windows Key + R -> compmgmt.msc      2. Expand System Tools -> Shared Folder -> Sessions ...