Archives

You are currently viewing archive for November 2007
Category: Web dev
Posted by: hajime osako
Category: Web dev
Posted by: hajime osako
GRANT ... IDENTIFIED BY 'mypass' [WITH GRANT OPTION];

If you do not want to send the password in clear text and you know the hashed value that PASSWORD() would return for the password, you can specify the hashed value preceded by the keyword PASSWORD:

GRANT ... IDENTIFIED BY PASSWORD '*6C8989366...' [WITH GRANT OPTION];

"If you create a new user but do not specify an IDENTIFIED BY clause, the user has no password. This is very insecure. However, you can enable the NO_AUTO_CREATE_USER SQL mode to prevent GRANT from creating a new user if it would otherwise do so, unless IDENTIFIED BY is given to provide the new user a non-empty password."

SET sql_mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER";

MySQL AB :: MySQL 5.1 Reference Manual :: 12.5.1.3 GRANT Syntax
Category: Web dev
Posted by: hajime osako
PHP TIPS Vol.5
header("Content-Disposition: inline; filename=\"".basename($path_file)."\"");
header("Content-Length: ".$content_length);
header("Content-Type: application/octet-stream");

あとHTMLヘッダーに:
<meta http-equiv="Content-Type" content="application/vnd.ms-excel; charset=UTF-8"/>

11/14: LDAPの基礎

Category: Web dev
Posted by: hajime osako
Active Directoryオブジェクトの識別名(DN)とは − @IT

DN (Distinguished Name) = "CN=suzuki,OU=Eigyou1,DC=example,DC=co,DC=jp"

上のカンマで区切られたものが、RDN:Relative Distinguished Nameで、属性名はディレクトリ・サービスに依存する。

Active Directory例:
CN=Common-Name (ユーザー名やグループ名、コンピュータ名、ほか)
OU=Organizational-Unit-name (組織単位(OU))
DC=Domain-Component (ドメイン構成)
Category: Web dev
Posted by: hajime osako
Category: Web dev
Posted by: hajime osako
Category: Web dev
Posted by: hajime osako
SSL/TLS の導入 (1)

RSA 秘密鍵生成と確認
openssl genrsa -out server.key 1024
openssl rsa -in server.key -text -noout

CSR 生成と確認
openssl req -new -key server.key -out csr.pem -sha1
openssl req -in csr.pem -text -noout

CRT 署名と確認
openssl x509 -in csr.pem -out server.crt -req -signkey server.key -days 365 -sha1
openssl x509 -in server.crt -text -noout

CRTの確認2
openssl verify server.crt
openssl asn1parse -in server.crt
Category: Web dev
Posted by: hajime osako