Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How do i make a Linux operating system (or unix for that matter) login with a username and password from a mysql database. I want to make it to where a user from the mysql database can access the unix machine through the login screen that always presents itself after starting the computer. How do i make it to where I can use a username and password from the mysql server to login to the machine with through the login screen.
if logging in with a MySQL username and password isn't possible then is there a way to use a table containing a username and password to login to the computer that can communicate with the MySQL database server
Last edited by baronobeefdip; 08-31-2012 at 07:31 PM.
How do I set it up (on the server and the client side). Plus in case that doesn't work is there another way besides pam-mysql. I also must mention that I am not configuring tables and databases through command line, I am editing the tables with LibreOffice BASE.
First you install the pam-mysql module on the client. Unless you find a precompiled package, you'll have to compile it from source. Fortunately, this is dead easy (it usually is) provided your distribution has the necessary developer tools installed. The INSTALL file contains instructions on how to do this.
Then you have to tell PAM to use pam-mysql when authenticating users. This incolves editing the relevant file(s) in /etc/pam.d. You would look for a file with a name corresponding to the process that will authenticate your users (for instance "sshd"). The README file contains details on the modifications you'll have to make.
The README file also contains details on how to provide the name of the MySQL server, the credentials that are to be used to log in to the database, and the database name, table and columns that hold the usernames and passwords.
The tool used to create the MySQL database is of no significance.
How do I add users and passwords, plus how do I change the passwords, and delete users from the databse. Since the passwords are hashed (I am assuming) There has to be a way to create the user's password somehow instead of just adding the user to the table manually.
The distribution I am using already has pam-mysql inside of the repo server (debian and ubuntu. unsure about redhat based distributions yet). now how do I connect it to the sql server (and I would like to know how to add users to the mysql server)
Last edited by baronobeefdip; 08-31-2012 at 08:36 PM.
You can add users in Base if you so choose. Otherwise, you'll find useradd among the executables that have PAM configuration files. If you add pam-mysql to the "account" section, it should create users in the MySQL database. I would imagine the same goes for userdel (and any other tool or GUI used to add or delete user accounts).
If you add pam-mysql to the "password" section of the passwd PAM config file, you can update passwords from the command line. You can do the same with the PAM file for any other tool used to create or change passwords.
pam-mysql supports both hashed and non-hashed passwords. Look in the FAQ section on the web page for more information on this and other topics.
I just changed the config file in /etc/pam-mysql.conf file to communicate (hopefully) with the mysql server. Now I need to know how to let the database communicate with the client. I have thought of the sql way of making it listen to incoming connections from certain clients but the problem with this method is that it only allows configuration for one user at a time and one host at a time. I want to make it to where all user requests will be accepted from any hosts without having to configure the database server to listen for them. I want to be able to setup a client somewhere and not configure the sql database to get it to accept communications from the client i just setup
Last edited by baronobeefdip; 08-31-2012 at 08:51 PM.
I am looking at the table "user" and it is only allowing connections for root from the client, I want MySQL to accept connections for all of the users in the database from all addresses on the network (although I do want to make the root user only accessible from a certain machine in the network)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.