Importing user accounts/passwords from another linux machine
I have couple of users in one machine. I can access the /etc/passwd,/etc/shadow and /etc/group files in this box. I have another box. I want to create some user accounts in the second box by just looking in the passwd, shadow and group files in the first box. I would just copy over the corresponding lines into the corresponding for whichever accounts I want to create as new and also change the lines for which I want to update the account information. Is this possible and will also the passwords work fine? Please also let me know there is any good tool for automatically doing this kind of stuff. Both the boxes that I have are Ubuntu machines though one is running Ubuntu 8.04 and the other is 10.04. Thanks in advance!
Thanks, Ganesh |
Quote:
Create a script to add the missing users/groups on the new box, and be done with it. And that's only really a good idea, if you've got LOTS (like over 100) users to add. Otherwise, it's a waste of time. The groupadd and useradd commands are not hard to use. |
Thanks for the reply TBOne. But I would also want to create the users in the second box with the exact passwords as in the first one and I don't know the passwords. So I don't think I can do this manually using the useradd or groupadd commands. Am I right?
|
Install a NIS server.
jlinkels |
NIS server
Quote:
|
Quote:
And you CAN specify a password on the command line. Read the man page for the useradd command, pay attention to the -p option. Changing the default method of authentication to migrate from one system to a new one, is alot of work. Again, you don't say how many users, but if it's just a few, tell them to pick new passwords. Set everyone a default password, and tell them to use it the first time. After login, it'll prompt them to change it. Problem solved. |
All times are GMT -5. The time now is 01:40 PM. |