[K12OSN] parse from shell comand

Doug Simpson simpsond at leopards.k12.ar.us
Wed Feb 15 20:09:34 UTC 2006

How can I make a script that would parse a line in the passwd file to 
return the full name of a user instead of outputting the entire line?

purpose: I have logins logged and it sends the login name to a log and it 
uses the %U (logins via samba to a samba PDC) in the log.  To my knowlege, 
there is no way to make it return the full name so I want to take the %U 
and run it through grep or something so it takes the username, finds it in 
/etc/passwd and returns the full name to be entered into the log instead 
of the username.

Cornfussed, yet?


Doug Simpson
Technology Specialist
DeQueen Public Schools
DeQueen, AR 71832
simpsond at leopards.k12.ar.us
Tux for President!

More information about the K12OSN mailing list