Solved How to change user passwords?

Hi, I would like to know how to change freebsd FreeBSD 10.1 user passwords?

I want to change the root and the user passwords. I want to do it in a way where it will automatically update all the software that uses that account with the new password.

For example my website uses MySQL and it uses my root account to get access. I don't want to break this if I change my roots password.

I used not that secure of a password and now I have a hacker on my butt. I want to know change my password to make it complex and hard to figure out. Any ideas on how to do this without locking myself out?
 
See https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/users-synopsis.html

Some things, like net/samba41 have a PAM module that can be integrated into PAM to provide what you are looking for. Stuff like MySQL that roll their own authentication don't really fit into that schema. PostgreSQL integrates with PAM -- http://www.postgresql.org/docs/9.4/static/auth-methods.html. If it integrates with PAM it might be easy. Otherwise, it all depends on how the authors of the software you use have written them to authenticate.
 
See https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/users-synopsis.html

Some things, like net/samba41 have a PAM module that can be integrated into PAM to provide what you are looking for. Stuff like MySQL that roll their own authentication don't really fit into that schema. PostgreSQL integrates with PAM -- http://www.postgresql.org/docs/9.4/static/auth-methods.html. If it integrates with PAM it might be easy. Otherwise, it all depends on how the authors of the software you use have written them to authenticate.
So, do I need to manually change the password for all server software like MySQL? I use webmin to help me config the server software. I have options to update the accounts passwords but it says update will take place once the FreeBSD user is modified. I don't know if I have to make password change to my server software first before making changes to the FreeBSD user?
 
MySQL does keep it's usernames in a separate place and must be changed separately. I've never used Webmin so I can't answer that part of your question.
 
Having actually used webmin (but also somewhat moved away from it) I might be able to shed a little light on this..

So, do I need to manually change the password for all server software like MySQL? I use webmin to help me config the server software.
Unfortunately Webmin support for FreeBSD is still pretty much lacking in several areas. However, that is not the case when it comes to supporting services such as MySQL (or other supported databases) and other software.

But as was hinted at above: in the end it heavily depends on how you configured those services. Take SSH for example: by default it'll utilize a username/password authentication through PAM but if you change this so it uses another authentication scheme then you would probably also need to reconfigure this part. That is obviously not something we can determine.

What I do know is that you should be careful here because Webmin won't change all of this for you on its own. So; if you change the password of the root account then it won't automatically look into other services such as MySQL and the likes.

MySQL is pretty much a given, but one thing though: are you sure you'd want its administrator password to be equal to that of your main root account? Although it might make things a little easier accessible it's also a potential security risk in my opinion. Or as I see it: MySQL (normally) uses a different authentication scheme for a reason...
 
Guys, I have the free versions no commercial versions and all are setup by default. The path locations are used by default. I am not an advance user so I stick with the defaults. That way I can easily get help and suggestions online. I am sure after using the software for 10 years. I will build confidence enough where I could config and change stuff myself. However, for now I stick with the defaults. I am worried for changing the passwords because I did this when I first created my first server. I was using FreeBSD 8.1 fort he first time. I changed the root password first and did a reboot. Once I did the reboot I got nothing but permission errors. I asked online for help and most told me that I needed to first change permissions from all software used before making the change. So, pretty much was told that I locked myself out and now don't have a bootable machine. I was told needed to reinstall the OS. I ended up doing this and lost a lot of files since I didn't back anything up. That was my first lesson to have a external hard drive. I reinstalled the OS and this time ordered a external hard drive to now backup my stuff. Anyway's, I am now worried because the passwords I used was more secure then the original passwords. However, I got a hacker on my butt and I need to now make the password very complex. However, I fear I will do the same thing and my external hard drives are all filled. I don't know if it's worth to buy another external drive and just do a backup on important files. Or do most think I can't really mess it up again?

What should I look out for? Should I first change MySQL and other server software passwords first?

When I installed these server software they used the defaults. They created usernames and groups in FreeBSD and must have created the passwords.

I just need some suggestions on what to do before changing the passwords? I don't want to run into any permission issues.

I personally think that changing the passwords would automatically update all the files that require that user. I know for MySQL I did create users. It grabbed the root user info. In webmin under MySQL there's an option where it says "The options below configure synchronization between Unix users created through Webmin and MySQL users."

There's three check boxes: add a new user when a new FreeBSD user is added.
the next one is update the MySQL user when a matching FreeBSD user has been modified.
the next one is delete a MySQL user when a FreeBSD user has been deleted.

I am thinking I can setup MySQL to sync up with FreeBSD users. So, if I change FreeBSD user passwords it will automatically update.

I just want to be sure that if I make changes to the password on FreeBSD on the root user. I won't be locked up when using the shell/ command prompt... like having permission issues.

I think my past experienced had more issues.. maybe I ran a command that changed critical files permissions which caused it. I am just making the assumption. Since, back the I had no clue how to manage a FreeBSD computer and years after learned a lot.

I am thinking to go to webmin and make the changes to server software password for root user. I then will change the root user password for FreeBSD and do a reboot. If all goes well. I will then change my own user account in the same way.

Do you think that's a good idea? Webmin does a lot of the automation. It looks for every server software it supports. They have a way to sync the users up with the FreeBSD users.
 
If anything, a rule of thumb is check, change, verify. Check beforehand to get your baseline, make the change, then verify afterwards your access is still good before dropping your current root or admin level session. As a general rule that is a safe bet with most changes.
 
Back
Top