Conn as sysdba $ sqlplus /nolog SQL> conn /as sysdba Change password first! SQL> ALTER USER [USERID] IDENTIFIED by [PASSWORD]; Check password life time SQL> select * from dba_profiles where profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME'; PROFILE RESOURCE_NAME RESOURCE ------------------------------ -------------------------------- -------- LIMIT ---------------------------------------- DEFAULT PASSWORD_LIFE_TIME PASSWORD 180 Set password life time to […]
centos7: cvs server Hint
yum install cvs xinetd adduser cvs passwd cvs su -l cvs $ cvs -d /home/cvs/testDir init $ vi /home/cvs/testDir/CVSROOT/passwd cvsuserid1:$1$ss$unix_passwd.:cvs cvsuserid2:$1$ss$xxxxxxxxxxg.:cvs passwd must be unix crypted like /etc/shadow otherwide... make Unix passwd by perl Hint not tested #!/usr/bin/perl crypt.pl srand (time()); my $randletter = "(int (rand (26)) + (int (rand (1) + .5) % 2 […]
mac os x : nfsd server Hint
# vi /etc/exports # nfsd start # nfsd status
centos7 : GUI Network setup Hint
# nmtui
chown symbolic link Hint
ll . | grep dirpath chown -h user.group dirpath
How to Get CPU Temperature Information on Linux Hint
# yum install lm_sensors # sensors-detect # sensors # watch -n 1 sensors
MySQL : Change Table Charset Hint
SELECT CCSA.character_set_name FROM information_schema.TABLES T, information_schema.COLLATION_CHARACTER_SET_APPLICABILITY CCSA WHERE CCSA.collation_name = T.table_collation AND T.table_schema = "test_db" AND T.table_name = "test_tb"; ALTER TABLE test_tb CONVERT TO CHARACTER SET utf8;
apache : block image direct url request Hint
.htaccess ====================== <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://(www.)?owllab.com.*$ [NC] RewriteRule .(jpg|jpeg|png|gif)$ - [NC,F] </IfModule> ====================== or more simple solution! ====================== <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} !([^.@].(?:(?:co|or|gv|ac).)?[a-z]{2,7})@@https?://.(\1)/.* RewriteRule .*.(jpe?g|png|gif|txt|pdf|zip) - [NC,F] </IfModule> ====================== Response Status Code: 403 Forbidden PHP test for regex ====================== <? //$tmp = "www.domain.com@@http://domain.com/dir1/test.php?pg=main&q=qqq"; $tmp = $_SERVER['HTTP_HOST']."@@".$_SERVER['HTTP_REFERER']; echo $tmp; echo "<br>"; echo […]