简体   繁体   中英

AWS EC2 Bitnami Wordpress setting security permissions for outsourced developer

I have setup Bitnami WordPress on EC2. I can login to wp-admin through the browser. I can login to phpmyadmin through SSH tunnelling. I can connect through sftp using filezilla and the pairing key.

I need to give access to an outsourced developer to upload a wordpress site on the server.

How do I do this securely, so that once he has done his job, he can never login again?

If I give the developer the exact login data and pairing key, I am worried I will never be able to revoke access.

I could change the password manually for wp-admin. However, I am not sure if that will solve phpmyadmin. Then, how do I ensure the pairing key wont't always grant access once they have a copy of it?

Note that to make the tunnel ssh to get access to phpmyadmin you should have the .pem/.ppk key file, without that, you won't be able to make the ssh tunnel.

If you do not want to give your credentials to another developer, you can create another wp-admin user and give him the credentials to work.

INSERT INTO `wp_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_status`)
VALUES ('newadmin', MD5('pass123'), 'firstname lastname', 'email@example.com', '0');

INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) 
VALUES (NULL, (Select max(id) FROM wp_users), 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');

INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) 
VALUES (NULL, (Select max(id) FROM wp_users), 'wp_user_level', '10');

Those are the sql commands to create another user in the wordpress database and how to give him admin privileges. You can find more info on internet.

cd /opt/bitnami/apps/wordpress/
sudo ./bnconfig --userpassword YOUR_NEW_PASSWORD

Change password and reset after site has been uploaded.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM