Method One: link in /sbin
sudo ln -s /[directory]/[script].[extension] /sbin/[alias]
本網誌主要是記錄筆者在使用電腦上疑難解決方法。希望藉著此平台跟大家分享交流。
This blog is used for sharing how to troubleshoot my computer problem. I would like to share them to each other through this platform.
2020-10-15
Execute from symbolic link
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
- Click Start, type regedit in the Start programs and files box, and then press ENTER.
- Locate and then right-click the registry subkey HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System.
- Point to New, and then click DWORD Value.
- Type EnableLinkedConnections, and then press ENTER.
- Right-click EnableLinkedConnections, and then click Modify.
- In the Value data box, type 1, and then click OK.
- Exit Registry Editor, and then restart the computer.
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;
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).
/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
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
2015-02-13
檢查Windows網絡硬碟使用哪個帳戶登記
The following command for checking Windows network drive used which account to map
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
2014-07-10
[Solved] Access denied ("java.util.PropertyPermission" "user.timezone" "write")
解決 Access denied ("java.util.PropertyPermission" "user.timezone" "write") 問題
Edit $JAVA_HOME\lib\security\java.policy (Both Program File and Program File x86)
grant {
...
permission java.util.PropertyPermission "user.timezone", "write";
};
save as java.policy and then replace the original.
Restart java.exe process
Edit $JAVA_HOME\lib\security\java.policy (Both Program File and Program File x86)
grant {
...
};
save as java.policy and then replace the original.
Restart java.exe process
2014-07-09
取得資料夾和子資料夾的權限和路徑列表
Get the List of Sub Directories with Their Owner & Permissions & Full Paths
先以find -type d找出所有/var以內所有資料夾的路徑,然後再用ls -dl 列出
ls -dl `find /var -type d`
source: http://www.ducea.com/2009/06/05/linux-tips-get-the-list-of-subdirectories-with-their-owner-permissions-and-full-paths/
先以find -type d找出所有/var以內所有資料夾的路徑,然後再用ls -dl 列出
ls -dl `find /var -type d`
source: http://www.ducea.com/2009/06/05/linux-tips-get-the-list-of-subdirectories-with-their-owner-permissions-and-full-paths/
2014-04-24
Enable JMX on tomcat7 running as Windows service
- Start 'Tomcat Configure' --> 'Java' tab --> 'Java Options' text box --> Append the followings
-Dcom.sun.management.jmxremote.port=8090
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
- Save, Exit and then restart the service
- Connect to the JMX console
- Start
jconsole
from your JDK installation location
example: C:\java\jdk1.6.0_37\bin\jconsole.exe - Click 'New Connection'
- Checked 'Remote Process'
- Enter
hostname:8090
訂閱:
文章 (Atom)
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 ...
-
Copy / Transfer Putty Configuration File / Profile 首先,你必需有權限執行登錄檔編輯程式。 First of all, You may have both computers administrative right to ...
-
Start Chrome with Incognito (Private) Browsing Mode Firstly, right click "Chrome" shortcut --> click "Properties" ...