cancel
Showing results for 
Search instead for 
Did you mean: 

Copy Username and password

SOLVED
Go to solution
Apol Pribadi
Occasional Visitor

Copy Username and password


I plan to move (copy) all of username and password from the old AS4100 to the new ES45, including all setting related to the username.

It is running Thru645.1B, C2 Security.

Any one please to let me know how the steps?


Thank you,
Apol
5 REPLIES
Victor Semaska_3
Esteemed Contributor

Re: Copy Username and password

Here's the steps that we've used:

On the old server:
Run authck to verify that the Enhanced Security database is free of errors. If it finds problems, correct them before proceeding.
# /tcb/bin/authck -av

Extract the accounts to a text file.
# /tcb/bin/edauth -d p -g > /tmp/p.auth

On the new system:
Run dxaccounts and set the desired defaults in the 'default' record in the 'Local Templates' view.
Copy the necessary files from the old server.
# cd /tmp
# ftp
Name (:):
331 Password required for .
Password:
ftp> cd /etc
ftp> ascii
ftp> get passwd
ftp> get group
ftp> cd /tmp
ftp> get p.auth
ftp> bye

Install the accounts on the new system.
# cd /etc
# cp passwd passwd_old
# cp group group_old
# mv /tmp/passwd .
# mv /tmp/group .
# chmod 644 passwd
# chmod 644 group
# cat /tmp/p.auth | /tcb/bin/edauth -d p -s

Verify that the copied accounts are OK.
# /tcb/bin/authck -av

Update the Hashed Password Database:
# mkpasswd -v /etc/passwd
There are 10 kinds of people, one that understands binary and one that doesn't.
Martin Moore
HPE Pro

Re: Copy Username and password

Victor,

Nice procedure. One thought:

> Run dxaccounts and set the desired defaults in the 'default' record in the 'Local Templates' view.

Wouldn't it be easier to just copy /etc/auth/system/default to the new system?

Martin
I work for HP
A quick resolution to technical issues for your HP Enterprise products is just a click away HP Support Center Knowledge-base
See Self Help Post for more details

Apol Pribadi
Occasional Visitor

Re: Copy Username and password

Dear Victor and Martin,

How if I also want to still keep original password and username from the new system including the oracle username? NOT just only copying from the old to the new system?

It means, I want to extend the existing username (system and oracle) and add the username/password from old system?

Thank you for help
Rgds,
Apol
Martin Moore
HPE Pro
Solution

Re: Copy Username and password

Victor's procedure almost does this already. The key is the two statements:

# /tcb/bin/edauth -d p -g > /tmp/p.auth (on the old server)


# cat /tmp/p.auth | /tcb/bin/edauth -d p -s (on the new server)

What this is doing is dumping the protected password database entries from the old system into an ASCII file, then using that as input to the new system. If there are usernames on the new system that are not in the file from the old system, they won't be affected. However, the command as written WILL overwrite the entry for any account names that exist on both systems, so the password from the old system would transfer to the new one.

But you can get around this if you add the -C option to the last edauth command, i.e., change it to:


# cat /tmp/p.auth | /tcb/bin/edauth -d p -s -C

This option restricts edauth to only creating new entries, so it won't overwrite any existing ones. This will then add all the accounts from the old system that weren't present on the new one, but it won't affect the accounts that were already present on the new one.

Martin
I work for HP
A quick resolution to technical issues for your HP Enterprise products is just a click away HP Support Center Knowledge-base
See Self Help Post for more details

Apol Pribadi
Occasional Visitor

Re: Copy Username and password


Dear Martin, and also Victor,

Thks alot with your steps.
It works now, and I already in new system.

Again Thks,
Rgds,
Apol