LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-11-2010, 04:11 AM   #1
Dims
Member
 
Registered: Feb 2009
Posts: 151

Rep: Reputation: 15
The same users and passwords for several machines?


How to make users, groups, paswords and their IDs be the same on several computers (for example, on cluster)?

Sorry this is a newbie question maybe...
 
Old 08-11-2010, 04:52 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well in general you'd use some form of centralised authentication, e.g. an ldap server, but going solely by what you've said, why not just add the user accounts to each machine and put in the same password?
 
Old 08-11-2010, 04:57 AM   #3
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

If you just want to 'copy' the users data over to another server instead of using a centralized authentication system you could follow the instructions on this page:
Move / migrate user accounts on Linux

Kind regards,

Eric
 
Old 08-11-2010, 07:17 AM   #4
Dims
Member
 
Registered: Feb 2009
Posts: 151

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by acid_kewpie View Post
but going solely by what you've said, why not just add the user accounts to each machine and put in the same password?
Because, as I know, the owner of a file is stored within it by user or group ID, which may be different on different machines.

So, if the file is owned by user 1002, from the point of view of first machine it may be "advanced user", while on other machine this ID may belong to "stupid user" and, thereafter, belong to this user, which may be wrong.
 
Old 08-11-2010, 07:28 AM   #5
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Quote:
Originally Posted by Dims View Post
Because, as I know, the owner of a file is stored within it by user or group ID, which may be different on different machines.

So, if the file is owned by user 1002, from the point of view of first machine it may be "advanced user", while on other machine this ID may belong to "stupid user" and, thereafter, belong to this user, which may be wrong.
Hi,

As clarified in the link I provided. Migrating/moving/copying regular users, NOT system users, to another machine using the instructions on that page will conserve the UID and GID and other information.

Kind regards,

Eric
 
Old 08-11-2010, 09:35 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by Dims View Post
Because, as I know, the owner of a file is stored within it by user or group ID, which may be different on different machines.

So, if the file is owned by user 1002, from the point of view of first machine it may be "advanced user", while on other machine this ID may belong to "stupid user" and, thereafter, belong to this user, which may be wrong.
That's only an issue if you're moving files between systems in certain ways, and seeing as you said nothing about what these systems are, it's still valid advice, especially as creating the users multiple times doesn't mean you can't set your own UID's anyway, just read the manpage.
 
Old 08-11-2010, 12:42 PM   #7
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
If you now realise that you have created users with the "wrong" UIDs, and you'd like to alter them, this is easy to do:

Make sure none of them are logged in. As root, go to "Single user mode" (well, I did).
Then the command (as root)
Code:
usermod -u new_uid_number username
will make the change for you.

Eg
Code:
usermod  -u 2001 tred
Will change my UID to 2001, and fix up all my files so they are now owned by UID 2001

Make sure the new_uid_number is not already in use!
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make a Server of LOGIN / PASSWORDS for flexible linux machines? frenchn00b Linux - Server 10 06-12-2010 04:25 PM
Users without passwords ahmedb72 Solaris / OpenSolaris 1 08-22-2007 05:05 AM
passwords for new users r.stiltskin Linux - Security 2 02-08-2006 05:21 AM
Default passwords for users paddyjoy Linux - Security 7 11-17-2005 03:30 AM
Help with users and passwords???? graystarr Linux - Software 3 04-21-2003 09:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 08:56 AM.

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