Quote:
|
Originally Posted by reborg
Actually you should not use this code, a partial match will result in locking the wrong user.
eg users: user2 and user23 projectuser234 , using user2 will lock all three.
Code:
awk 'BEGIN{IFS = OFS = ":"} $1 == "youruser" { $2 = "*LK*" } { print }' /etc/passwd
|
ah yes.. i missed out that one, should be == instead. tks