LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   how to filter output from passwd file (https://www.linuxquestions.org/questions/linux-general-1/how-to-filter-output-from-passwd-file-387314/)

mussussu 11-28-2005 02:36 PM

how to filter output from passwd file
 
I would like to know how can I type a command to filter the output of the passwd file to only get the entries of the user name and userID, the purpose is for security, because only root has an ID of 0,
thanks for the response

Tinkster 11-28-2005 02:48 PM

awk -F: '{print $1" "$3}' /etc/passwd


Cheers,
Tink

mussussu 11-28-2005 05:17 PM

Thanks for the quick response
 
hey, thanks for the answer, very helpful


All times are GMT -5. The time now is 01:14 AM.