/etc/logrotate.conf
$ ls -l /etc/logrotate.d
total 64
-rw-r--r--. 1 root root 155 Aug 20 2014 aide
-rw-r--r--. 1 root root 178 Jun 23 2015 chrony
-rw-r--r-- 1 root root 292 Mar 19 09:50 content_gateway_rotate
-rw-r--r--. 1 root root 71 Jul 21 2015 cups
-rw-r--r-- 1 root root 172 Jun 29 2016 iscsiuiolog
-rw-r--r-- 1 root root 165 May 26 2016 libvirtd
-rw-r--r-- 1 root root 163 May 26 2016 libvirtd.qemu
-rw-r--r--. 1 root root 106 Sep 5 2014 numad
-rw-r--r--. 1 root root 136 Jan 27 2014 ppp
-rw-r--r--. 1 root root 408 Oct 1 2014 psacct
-rw-r--r-- 1 root root 115 Jul 4 2016 samba
-rw-r--r--. 1 root root 71 Oct 13 2015 subscription-manager
-rw-r--r--. 1 root root 224 Sep 8 2015 syslog
-rw-r--r--. 1 root root 32 Dec 9 2013 up2date
-rw-r--r--. 1 root root 100 May 20 2015 wpa_supplicant
-rw-r--r--. 1 root root 100 Sep 11 2015 yum
$cat /etc/cron.daily/logrotate
#!/bin/sh
/usr/sbin/logrotate /etc/logrotate.conf
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
/usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
fi
exit 0
Monday, March 19, 2018
Thursday, February 15, 2018
redhat su: Permission denied
edit
/etc/pam.d/su
remark the following line
auth required pam_wheel.so use_uid
It requires users to be in the wheel group to be able to switch user.
User switching as non-root works again when this pam module is disabled for su.
Sunday, March 19, 2017
Thursday, September 01, 2016
Thursday, March 12, 2015
HMC web console V7R7.3 pending issue
For Firefox
1) Start up Firefox
2) In the URL area, type about:config
3) In the search area type tls
4) Change security.tls.version.min from "1" (default) to "0."
5) Change security.tls.version.fallback- limit from "1" to "0"
For Chrome
1) Start Chrome
2) In the URL area type: chrome://flags
3) Find the "Minimum SSL/TLS version supported" flag and change the value to SSLv3.
1) Start up Firefox
2) In the URL area, type about:config
3) In the search area type tls
4) Change security.tls.version.min from "1" (default) to "0."
5) Change security.tls.version.fallback-
For Chrome
1) Start Chrome
2) In the URL area type: chrome://flags
3) Find the "Minimum SSL/TLS version supported" flag and change the value to SSLv3.
Monday, May 26, 2014
Edit the "last" output in AIX
/usr/sbin/acct/fwtmp <./wtmp > ./dummy.file
/usr/sbin/acct/fwtmp -ic <./dummy.file > ./wtmp
/usr/sbin/acct/fwtmp -ic <./dummy.file > ./wtmp
Friday, May 09, 2014
Friday, October 25, 2013
Windows 2008 Time sync. configuration
1. check the time server with "w32tm /stripchart /computer:[Time_Server_IP] /dataonly /samples:5"
2. sync by setting "w32tm /config /manualpeerlist:[Time_Server_IP],0x8, /syncfromflags:manual /update"
3. Or if it has joined the domain, default it should be syncing with one of the Domain controllers
4. you can manually configure that by typing: "w32tm /config /syncfromflags:domhier /update"
5. restart the time service
6. "w32tm /resync" to sync immediately ( it may failed, re-run step1 to verify the status)
2. sync by setting "w32tm /config /manualpeerlist:[Time_Server_IP],0x8, /syncfromflags:manual /update"
- 0x8 -- set Windows time to use client mode
3. Or if it has joined the domain, default it should be syncing with one of the Domain controllers
4. you can manually configure that by typing: "w32tm /config /syncfromflags:domhier /update"
5. restart the time service
- net stop w32time
- net start w32time
6. "w32tm /resync" to sync immediately ( it may failed, re-run step1 to verify the status)
Monday, September 16, 2013
Export and Import DHCP Reservations for Windows Server
Export the DHCP reservation list on A server,
netsh dhcp server [ip address] scope [scope address] dump > reservation_list.txt
e.g. netsh dhcp server 172.17.32.131 scope 172.17.32.0 dump > reservation_list.txt
Edit the exported file in notepad 'reservation_list.txt' , Simply do a Find and Replace for the A server IP you ran the export on and change to the B server IP you are importing to and remove out everything else in the text file except for the reservations config section.
Import the DHCP reservation list:
netsh exec reservation_list.txt
netsh dhcp server [ip address] scope [scope address] dump > reservation_list.txt
e.g. netsh dhcp server 172.17.32.131 scope 172.17.32.0 dump > reservation_list.txt
Edit the exported file in notepad 'reservation_list.txt' , Simply do a Find and Replace for the A server IP you ran the export on and change to the B server IP you are importing to and remove out everything else in the text file except for the reservations config section.
Import the DHCP reservation list:
netsh exec reservation_list.txt
Friday, April 05, 2013
AIX NFS sharing/mounting
NFS Sharing
start NFS service
-->smitty-->Communications Applications and Services-->NFS-->Network File System (NFS)-->Configure NFS on This System-->Start NFS
share a file system
-->smitty-->Communications Applications and Services-->NFS-->Network File System (NFS)-->Add a Directory to Exports List (or smitty mknfsexp)
list out all shared file system
#showmount -e localhost
NFS Mounting
mount a file system
-->smitty-->Communications Applications and Services-->NFS-->Network File System (NFS)-->Add a File System for Mounting (or smitty mknfsmnt)
start NFS service
-->smitty-->Communications Applications and Services-->NFS-->Network File System (NFS)-->Configure NFS on This System-->Start NFS
share a file system
-->smitty-->Communications Applications and Services-->NFS-->Network File System (NFS)-->Add a Directory to Exports List (or smitty mknfsexp)
list out all shared file system
#showmount -e localhost
NFS Mounting
mount a file system
-->smitty-->Communications Applications and Services-->NFS-->Network File System (NFS)-->Add a File System for Mounting (or smitty mknfsmnt)
Thursday, December 06, 2012
Add static route in windows
Add static route in windows:
1. shows routing table
netstat -nr
2. permanent add connecting to 172.17.0.0 through 172.17.32.1 gateway with the lower priority 2
route -p add 172.17.0.0 mask 255.255.0.0 172.17.32.1 metric 2
1. shows routing table
netstat -nr
2. permanent add connecting to 172.17.0.0 through 172.17.32.1 gateway with the lower priority 2
route -p add 172.17.0.0 mask 255.255.0.0 172.17.32.1 metric 2
Monday, December 03, 2012
Error: The remote session was disconnected because there are no Remote Desktop client access licenses available for this computer. Please contact the server administrator.
remove the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing
Tuesday, April 12, 2011
blocking application in winXP
1. Start->Run->secpol.msc
2. Expand software restriction policies
Right click Additional rules-> New Path Rule
Path: C:\Program Files\Outlook Express\msimn.exe
Security Level: Disallowed
Click OK
2. Expand software restriction policies
Right click Additional rules-> New Path Rule
Path: C:\Program Files\Outlook Express\msimn.exe
Security Level: Disallowed
Click OK
Monday, October 11, 2010
Manage Windows7 SEP client with SEP 11 SEM
1.) Clients don't appear in the SEM console
a. Delete %programfiles%\Common Files\Symantec Shared\HWID\sephwid.xml
b. Open the registry and navigate to HKLM\Software\Symantec\Symantec Endpoint Protection\SMC\Sylink\Sylnk
c. Edit the "HardwareID" value data to be blank
d. Restart the client workstation or Symantec Management Client (SMC) service in the services snap-in.
refer: http://www.symantec.com/business/support/index?page=content&id=TECH102815&locale=en_US
a. Delete %programfiles%\Common Files\Symantec Shared\HWID\sephwid.xml
b. Open the registry and navigate to HKLM\Software\Symantec\Symantec Endpoint Protection\SMC\Sylink\Sylnk
c. Edit the "HardwareID" value data to be blank
d. Restart the client workstation or Symantec Management Client (SMC) service in the services snap-in.
refer: http://www.symantec.com/business/support/index?page=content&id=TECH102815&locale=en_US
Wednesday, March 24, 2010
sed & awk
Split the line with field separator ".", and restructuring again
awk -F. '/stbdbp/{ print $2"."$3"."$4"."$5".Z"}' ./list.txt
Insert "go" to the next of every lines from test_new.log
sed '1,$ {
a\
go
}' test_new.log
a\
go
}' test_new.log
Remove the line which contains "#" from test_new.log
sed '/#/d' test_new.log
Remove blank line from test_new.log
sed '/^[ ]*$/d' test_new.log
Monday, June 08, 2009
Tuesday, December 30, 2008
Thursday, November 06, 2008
error log, enable tty console
errlogter (test the errpt)
/usr/lib/errdemon (errpt demon)
alog -o -t console (show console message)
smitty tty
/usr/lib/errdemon (errpt demon)
alog -o -t console (show console message)
smitty tty
Friday, October 24, 2008
check memory info. in AIX
# bootinfo -r
# svmon -G (use 4K block to count)
size inuse free pin virtual
memory 1048576 584861 463715 82089 532513
pg space 425984 409635
work pers clnt lpage
pin 82089 0 0 0
in use 289507 295354 0 0
# svmon -G (use 4K block to count)
size inuse free pin virtual
memory 1048576 584861 463715 82089 532513
pg space 425984 409635
work pers clnt lpage
pin 82089 0 0 0
in use 289507 295354 0 0
Subscribe to:
Posts (Atom)
