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
I am requesting the src code. According to the GPL licenses you must make it available to people who are looking for it.
Would it be possible to get access to the source code?
@elimination17
Also, I have the need to add a group column to the DB. This seems to work fine for people who already have passwords using the update feature but setting a new pw and we get the following error on the console:
2013-03-04 18:13:00 [INFO] UserName issued server command: /dbp set XXXXXXXXXX 2013-03-04 18:13:00 [INFO] [DBPassword] {debug} Hash: SHA-1 2013-03-04 18:13:00 [INFO] [DBPassword] java.sql.SQLException: Field 'group' doesn't have a default value
I was thinking if you added some fields to the config file that you could just stuff with nulls (or even allow us to pre-populate data)
Something similar to:
Just an idea.
@SDpyro
Thanks for the update, I havent built or tested this plugin against the latest builds in quite some time. Its possible how plugin reload used to work has changed. I will take a look at this and post an update when i have some time.
"/dbp reload" is not actually doing anything a full restart is needed to re-read the config.yml OR if you have PluginReloader.jar loaded you can do "/plugin reload DBPassword"
Thought I would let you know. Thank you for this plugin. This a VERY important plugin to me, and am VERY grateful for your time.
Is it possible the DBPassword-Plugin integrate in an other table witch already exist? e.g: Table: id uid aid email warnings status
And now the plugin add the own structure it looks so: id uid aid email warnings status username password salt
I already tried this but in the console of putty only this error: java.sql.SQLException: Field 'uid' doesn't have a default value
Viiiid same question, can it work with wordpress? That would be awesome !!!
@ScottCameron
Can you post your config without your db connection info? Is the use dynamic salt options set to true?
When I remove the salt it doesn't encrypt it to just 'MD5'. It's adding something in it.
@elimination17
I solved the issue on my own using a 5-lined long MySQL query, but I'm sure that feature would come in handy for other users like me. I for instance use it to add the password to the MCMMO users to prevent the id-problem.
@timesheep
Just uploaded the new version with those config options. Let me know if you have any other questions or feature requests.
@timesheep
I dont see why not, Give me a bit and ill work on that
Would it be possible to make the column-name for the rest of the fields configurable as well so it's not only the salt column?
@viiiid
It might be able to, I personally havent dealt with joomla in a while nor do i know what its user table looks like. If you want to private message me some of the details of the site I may be able to help you out.
Hi, could i use this plugin, for people to make accounts, in game for my joomla site? If yes how would i do that?
Thanks!
I'm using this for a programming I developing that allows users (on my website) to access their minecraft account (on my server) without ever having to startup minecraft.
How could I make it so when the user signs up on my website, the automatically become Member? Or is that not possible with this plugin?
after looking at the code, I am dissapointed :(
do you think you will ever add variable column names? the system I use does not allow me to alter them :/
How do you change column names?