LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Searching username in a password file (https://www.linuxquestions.org/questions/linux-newbie-8/searching-username-in-a-password-file-93114/)

Linix 09-15-2003 03:12 PM

Searching username in a password file
 
How do i search for a username within a shadow password file? Many thanks in advance :-)

MasterC 09-15-2003 03:38 PM

Not sure I follow, a quick glance over my /etc/shadow file definitely shows, in plain text, the usernames...

Cool

Linix 09-15-2003 04:01 PM

Thanks for replying MasterC. Well the shadow file i'm dealing with has lots and lots of usernames. Ofcourse, I can go through each one of them and try to find the specific username but I figured that would be too much of a hassle. So I was wondering if there was any shortcut? I tried googling but nothing helpful came up.

MasterC 09-15-2003 04:04 PM

Open up the file, in say, vim and type:
/username

This will search that file for 'username'.

HTH

Cool

Linix 09-15-2003 04:07 PM

Thanks again MasterC. Would do :-)

MasterC 09-15-2003 04:20 PM

Glad I could help ;)

Cool


All times are GMT -5. The time now is 11:46 AM.