Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
I want to authenticate into my system many users, but I don't try useradd 300 times and add 300 lines into /etc/passwd.
Can I to use one account (for example /home/unique-user) and different ssh public keys to set many accounts and different permissions for subdirectory in unique-user for each user (for example /home/subdirectory/{dir1, dir2, dir3...})?
That is to say, how can to assign dir to ssh public key 1, dir to public ssh key 2, ...
I don't think it's possible.
You can specify individual identity files when logging in, but all the subdirectories will be owned by and effectively accessed by, unique-user. This means any authenticated user will have complete access to everybody else's directories.
To create a account into any system I necessary must have /etc/passwd?
Can I create a account into system without using /etc/passwd file but with Kerberos, Radius or LDAP?
Okay but what would MySQL give you that you don't have with the normal approach?
You can use MySQL as a layer on top of the /etc/passwd if it is a more convenient access mechanism to the account information that you want but maybe you want more which I don't know about. So back to my original question why?
Q: Can I create a account into system without using /etc/passwd file but with Kerberos, Radius or LDAP?
Yes, of course. It takes a bit more work and requires a LOT more sophistication than the simple "/etc/hosts" method. But it's clearly superior for an "enterprise environment" where a user's "identity" and user "roles" span many hosts.
Quote:
I'd like to use MySQL instead /etc/passwd for managing accounts
Bad idea - don't go there.
If you've got a web app (for example, a self-serve kiosk) that already has a MySQL back-end, and you want to manage users specific to that web app - then sure: MySQL is ideal. Go for it!
But it you just want to save yourself typing 300 names ... and then you still want those 300 users to be able to log in to an actual host, give them "home directories", let them run programs, read and write files, etc etc - then trying to jury rig some homebrew login scheme with MySql (or just about anything else) ... is a really, really REALLY bad idea.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.