DBPassword
DBPassword v0.7 by Chausser
Description:
This plugin is meant to allow players on your server to setup a password and have it save to a MySQL database. This is my first ever java project as well as my first Bukkit Plugin. This plugin was largly inspired by Noneofyourbusiness and his Password plugin.
How I use this plugin: On my server (mcserver.nkings.com) all users that join the server are added to the users database with a random password. They have to set their password in game using this plugin before they can access the members section to the website.
The password function works like this: hash(salt+password);
For example if you are using the MD5 hash and a salt of "MyS@LT" and its given a password of "password" the funtion would be: MD5(MyS@LTpassword) = 364a711788b4dff21173f96181e13019
If you do not want to use a salt for your passwords you just want to hash them you can just set the salt in the config file to: ""
Features
- Fully Configurable Database connection info including:
- Host Address
- Host Port
- Database Name
- Database Table Name
- Database Username
- Database Password
- Ability to customize the column names for the table:
- id
- username
- password
- salt
- As well as support for both many encryption types:
- MD5
- SHA-1
- SHA-256
- SHA-384
- SHA-512
- All with an optional security salt(dynamically generated or pre defined)
Installation
- Download and copy the plugin jar to your plugins folder
- Start your server, this will build the default config file
- Stop your server, Update all config settings to your liking.
- Start your server again, and you should be good to go.
Upgrading From A Previous Version
- You will need to back up your config file and let the plugin generate a new one. The latest version has almost a complete reworking of the config file
- Once the plugin has generated the new config file and you have updated the settings you should be good to go again.
Permission
Optionally only allow users with a certain permission node to set/update their passwords
- dbp.*
- dbp.set
- dbp.update
- dbp.reload
Commands
- /dbp set <password> - set your password
- /dbp update <password> - updates your password
- /dbp reload - reloads the configuration without the need to restart the server.
Known Issues
- Setting the column names in the config after the database table has been generated will not update the database table automatically. If you want to use this option you will need to update the table manually.
Change Log
- v0.8 - Added the ability to customize the column names of the table.
- v0.7 - Added a lot of new features including, dynamic salt generating, the ability to save that salt to a defined field in the database. Tested for 1.2.3-R0.1 and 1.1-R6/7
- v0.6 - Updated for CB1.1-R4 - Added more hash types, cleaned up the sql statements, switch permissions to superperms only
- v0.5 - Updated for RB 1317 - Some major command restructuring. Hopefully fixed issue where passwords were not getting hashed correctly.
- v0.4 - Updated for RB 1240 - Added support for SuperPerms
- v0.3 - Changed the default config values so that they dont use the single and double quotes.
- v0.2 - Fixed the port issue. Added better permission support. Restructured the command a little bit. Added a reload command so you don't have to reboot the server to change settings
- v0.1 - Initial Release
@ThoLav
Its not really what this plugin was meant to do. I mean yes i could modify it to support that but really i just built this plugin because its what I needed on my server and for my website. Because of this I prolly wont be adding that much functionality to the plugin. But if you have any other recommendations dont hesitate to ask :)
Hi,
thank you for this great plugin.
I have a feature request: It would be nice, if it also could be used for login. Have a look at this plugin, if you don't know what I mean.
What do you think about? It would be awesome.
Hello I just want to say : Thank you!
This plugin is exactly what I need for my server. :)
here is a new plugin that will allow players to create passwords: http://dev.bukkit.org/server-mods/login_plugin/
its really great and it support minecraft1.1
Hello, since 1.1 bukkit version this plugin doesnt work for me.
In the logfile there is this error:
[INFO] com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.Connection was implicitly closed by the driver. 2012-01-29 15:36:42 [INFO] com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.Connection was implicitly closed by the driver.
When do you update it to 1.1?
Sorry. This plugin is the only one.
Your plugin is the best. Its exactly what i need but could you update it to the latest bukkit? I really need this. Dont know why there are only two 'password' plugins. This plugin is the most needed one if you want to run unsecured bukkit.
Thank you! This plugin is exactly what I needed - simply doing the job.
There is only one error which i get - I sent you the ticket with logs.
@Demonlover11
Yes, you tell the plugin what you users table name is and it will attempt to add a record on signup with the users ingame username and the hash of the password the chose.
So basically with this people can sign up for my Website and Arcade by doing this in-game?
hwD
Yes now it works with the upgrade. Thanks for the nice Plugin ;)
@MaMax
Try the latest version (v0.5). Make sure you delete your existing config file and let the plugin generate a new one. Then update your settings.
@MaMax
does the plugin give you any errors in the console when you set your password in game?
I would use the dbpassword for a login, but the md5 are not working. Here the php code
if($usr['password'] != md5($_POST['password'])){
DBPassword save the md5 password, but when i wanna login it dosn't work.
When i use the php register
$sql = "INSERT INTO usercppw (username,password) VALUES ('".$_POST['username']."','".md5($_POST['passwd'])."')";
its save as md5 and it works.
Here my config.yml
<<code yml>>
security: encryption: MD5 salt: '' mysql: port: '3306' host: localhost table: usercppw password: 'password' user: '''USER''' database: DB<</code>>
what make i wrong?
.MaMax
@Aefio
Ok after spending a couple of hours playing around with mybb last night it doesnt look like you will be able to use my plugin to create / update users and their passwords. The registration process for those forums is a little more involved than just inserting a username and password into the database.
This plugin was more designed to be used the custom websites that have simple user tables.
I can however add some options that will allow your users to update their password from within minecraft AFTER they have registered for the forums.
I may spend some time this up coming weekend adding a way for a user to go through a mybb registration in game. we'll see, its going to be really involved.
@Aefio
As I understand it you are trying to use this plugin to allow users to set and update their passwords for your MyBB based site right? So knowing what their table structure is like I can add an option to the plugin that will work with an existing MyBB table for user password management
MyBB. I am not sure what this has to do with it being a forum software but you can give it a go and see if it helps.
@Aefio
This wasnt really designed to be used by forum software. Although i have no issue trying to make it work with a forum software. I just need to know what one your using
@Aefio
what forum software are you using? ill see if i can reproduce the issue