[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 313
  • Last Modified:

linux password status quesiton

I would like to search all the accounts in /etc/shadow file using this syntax and not workng


cat  /etc/shadow  |  grep   "!!"  *


It is not working
0
mokkan
Asked:
mokkan
  • 2
  • 2
2 Solutions
 
PapertripCommented:
cat /etc/shadow | grep '!!'

Open in new window

or
cat /etc/shadow | grep "\!\!"

Open in new window



0
 
PapertripCommented:
Also instead of cat'ing the file then grep'ing, you can just grep the file directly
grep '!!' /etc/shadow
grep "\!\!" /etc/shadow

Open in new window

0
 
mokkanAuthor Commented:
The following one also not working .

grep \!! /etc/shadow
0
 
mokkanAuthor Commented:
Thank you guys. It worked.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now