Please create an account to participate in the Slashdot moderation system


Forgot your password?
User Journal

Journal Wonko the Sane's Journal: Giving all users database server access by default. 3

Especially with KDE applications there is a need for each user on a system to have access to a relational database to get full functionality. Usually this is provided by MySQL. Every database server for linux that I know of has its own concept of usernames and passwords which must be configured seperately from the users on the system because traditionally a database server served clients over the network, not local users.

Is there any way to set up MySQL or a MySQL-compatable database that gets username and password information from PAM and stores data in each user's home directory? This would make database access work just like mail delivery, as long as a user exists in the system and has a ~/.mysql_data directory he or she has full access to any database stored in that directory with no per-user configuration required.

It seems to work for mail, why not for databases also?

This discussion has been archived. No new comments can be posted.

Giving all users database server access by default.

Comments Filter:
  • Postgres has one but it's basically just to check username+password, you have to manually create the matching user account, it won't automatically generate one or anything like that. Furthermore, it won't work with /etc/shadow since postgres doesn't run as root and therefore can't read it. See []

    There's too much internal permission junk that would have to be set up in order for it to all work together automatically (not to mention the

    • (not to mention the whole user vs user@host thing)

      It's ironic that just to get access to the database in the first place you need to break good practices by duplicating information that is conceptually the same. Especially when you're talking about one MySQL server taking care of all the Amarok users on a lan. I'm still the same user no matter which machine I happen to log in from. Why should I need multiple entries in a user table to account for all the possible locations from which I might choose to acces

      • by Qzukk ( 229616 )

        Can't answer that, but I did think of something that may work. There is a pam module for using mysql for user authentication. I think mysql's users are stored in a table, perhaps you can alter that table to add enough columns to store enough information to replace /etc/passwd, and have PAM read from mysql instead of the other way around (may implode on apps that expect to use /etc/passwd). You still have the issue of user@host, but you could create user and user@localhost entries for each user during sig

Genius is one percent inspiration and ninety-nine percent perspiration. -- Thomas Alva Edison