What I have already done:
1. Same user created on both system and passwordless ssh form system a to system b through that user
I need to write a small script to copy /etc/shadow file of sytem a to system b,
script needs to be executed on system b.
But as /etc/shadow file is owned by root ,it shows message like permission denied.
on Server A
as root user
on server B
as root user TEST several user logins on serverB. Note: Create separate processes for login testing, KEEP YOUR root PROCESS active no matter what, so if you broke stuff, you can still fix it. If you really broke things, nobody can login to serverB, including root. Use the copy /etc/shadow.keep to restore.
Go back to serverA
This effort will not work to duplicate passwords if you are using NIS or LDAP or you have messed with PAM setup on either box.
But my requirement is this. below is my script and I need to SCP /etc/shadow from remote server to my DR system.
Now please guide as how to accomplish thisbecause it ask for root password before copying,
NOte I have setpasswordless login from same user on all the systems.
You cannot copy /etc/shadow in the same way as you are scp'ing /etc/passwd and the other files you list. You need root permission to make this happen because of the mode (permissions) of /etc/shadow. Just doing a passwordless scp is not going to fix this issue for you.
As a part of linux hardening
In shadow file all Application accounts which are not locked must contain only an asterisk “*” in the Passwd field.
But how would i do it by using command?
Is there any way other than modifying shadow file to accomplish this task? (3 Replies)
Hi,
In shadow file
smithj:Ep6mckrOLChF.:10063:0:99999:7:::
3rd Field 10063 indicates the number of days (since January 1, 1970) since the password was last changed.
I want to get the result with script the date on which the password was last changed in YYYY-MM-DD format.
can... (8 Replies)
Hi,
When i run the code in solaris unix machine, the file from remote server is getting downloaded. but when i use the same code in IBM AIX remote machine, it is not running. It is saying "Erro during scp transfer." Below is the code.
Please give some resolution.
SCPClient client = new... (1 Reply)
Sirs,
What is a shadow file,How it be usefull.For my project i have to keep the password in shawdow file also i am doing in php how can i do it.
Thanks in advance,
ArunKumar (3 Replies)
Please someone I need information on how to change a Unix form/document into a microsoft word document in order to be emailed to another company. Please help ASAP. Thankyou :confused: (8 Replies)