LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-15-2003, 03:12 PM   #1
Linix
LQ Newbie
 
Registered: Aug 2003
Location: Wisconsin
Posts: 8

Rep: Reputation: 0
Searching username in a password file


How do i search for a username within a shadow password file? Many thanks in advance :-)
 
Old 09-15-2003, 03:38 PM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

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

Cool
 
Old 09-15-2003, 04:01 PM   #3
Linix
LQ Newbie
 
Registered: Aug 2003
Location: Wisconsin
Posts: 8

Original Poster
Rep: Reputation: 0
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.
 
Old 09-15-2003, 04:04 PM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

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

This will search that file for 'username'.

HTH

Cool
 
Old 09-15-2003, 04:07 PM   #5
Linix
LQ Newbie
 
Registered: Aug 2003
Location: Wisconsin
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks again MasterC. Would do :-)
 
Old 09-15-2003, 04:20 PM   #6
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Glad I could help

Cool
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
username and password no go bmd Linux - Newbie 7 04-06-2005 08:26 PM
username/password sailu_mvn Programming 5 12-21-2004 03:21 AM
UserName and Password luis8460 Red Hat 0 07-08-2004 04:45 AM
Username and Password dance2die Arch 3 09-01-2003 03:32 PM
File sharing: username and password setup dmg2206 Linux - Networking 2 03-04-2002 12:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration