Object Password Plugin
Create table
Create Table
CREATE TABLE IF NOT EXISTS `ObjectPWs` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`object_id` int(10) unsigned NOT NULL,
`user_name` char(64) DEFAULT NULL,
`password_hash` char(64) DEFAULT NULL,
`comment` text,
PRIMARY KEY (`id`),
KEY `object_id` (`object_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1490 ;
Copy php file
cp passwords.php /usr/local/share/RackTables/plugins
Generate random key
echo "`tr -dc A-Za-z0-9_ < /dev/urandom | head -c 64`"
QDlXtJAHtY_FzJysghuXiz_kxptLA8eLjblaxLxvAoUrw1grOLO3xytaN5aghV78
Insert random key
password.php
...생략...
$tab['object']['passwords'] = 'Passwords';
$tabhandler['object']['passwords'] = 'passwordsTabHandler';
//$ophandler['object']['passwords']['addPW'] = 'addPW';
//registerOpHandler (object, passwords, addPW, addPW, after);
$key = "QDlXtJAHtY_FzJysghuXiz_kxptLA8eLjblaxLxvAoUrw1grOLO3xytaN5aghV78";
...생략...
No comments:
Post a Comment