LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 06-20-2010, 05:49 AM   #1
shifter
Member
 
Registered: May 2006
Distribution: Slackware, DragonFly
Posts: 233

Rep: Reputation: 30
problem with many account


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, ...

savio

Last edited by shifter; 06-20-2010 at 05:53 AM.
 
Old 06-20-2010, 08:20 AM   #2
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
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.
 
Old 06-20-2010, 10:04 AM   #3
shifter
Member
 
Registered: May 2006
Distribution: Slackware, DragonFly
Posts: 233

Original Poster
Rep: Reputation: 30
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?
 
Old 06-20-2010, 09:25 PM   #4
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148
Why do you want to avoid using the normal account handling process?
 
Old 06-21-2010, 09:14 AM   #5
shifter
Member
 
Registered: May 2006
Distribution: Slackware, DragonFly
Posts: 233

Original Poster
Rep: Reputation: 30
I'd like to use MySQL instead /etc/passwd for managing accounts
 
Old 06-21-2010, 08:29 PM   #6
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148
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?
 
Old 06-21-2010, 09:40 PM   #7
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

Quote:
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.

IMHO .. PSM

Last edited by paulsm4; 06-21-2010 at 09:41 PM.
 
Old 06-24-2010, 05:42 PM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Moved to Linux-General (Not a prograqmming question)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh local account / ldap account Poil Linux - Security 5 02-26-2010 01:04 AM
Erased old account for new one; forgot to give admin priv to new account. RHLinuxGUY Ubuntu 3 08-10-2008 07:56 PM
Why is my common account can't open Terminal in XFCE4 but root account? notsay Slackware 4 08-18-2007 11:29 PM
is it legitimate and allowed and can be done to make another user account set uid and gid to null 0 to make another root account with different name and possibly not damage the debian system creating and using that new account BenJoBoy Linux - Newbie 12 01-29-2006 10:02 AM
Problem with using my account leimus SUSE / openSUSE 2 12-30-2004 08:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration