I have a standard passwd file & a usermap file – which maps unix name (eg jbloggs) with AD account name (eg bloggsjoe) in the format:
jbloggs bloggsjoe
jsmith smithjohn
… etc.
How can I edit the passwd file to swap the original unix name with the AD account name so each line of the passwd file has the AD account name instead.
Appreciate any help for a perl learner.
I have a standard passwd file & a usermap file – which maps unix
Share
here’s a awk one liner to do that