You need to use a double equal sign for comparisons:
Code:
{if($1=="<user-name>") print $0}
The way you do it, the following happens: You set $1 (the first field) to user-name, the if condition is true, and you print the entire line from the password file with the new user-name.
By the way, the awk way of doing things is as follows:
Code:
$1=="username" { print }
That is, you convert the if clause to a pattern.