linux password status quesiton

Posted on 2011-10-28
Last Modified: 2012-06-21
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
Question by:mokkan
    LVL 21

    Accepted Solution

    cat /etc/shadow | grep '!!'

    Open in new window

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

    Open in new window

    LVL 21

    Assisted Solution

    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


    Author Comment

    The following one also not working .

    grep \!! /etc/shadow

    Author Closing Comment

    Thank you guys. It worked.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Currently, there is not an RPM package available under the RHEL/Fedora/CentOS distributions that gives you a quick and easy way to allow PHP to interface with Oracle. As a result, I have included a set of instructions on how to do this with minimal …
    If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now