Find the answer to your Linux question:
Results 1 to 4 of 4
I have found users on my linux machine by using command. # egrep -v '.*:\*|:\!' /etc/shadow | awk -F: '{print $1}' then i locked some of users which were not ...
  1. #1
    Just Joined!
    Join Date
    Mar 2011
    Posts
    2

    Cool Locked users

    I have found users on my linux machine by using command.

    # egrep -v '.*:\*|:\!' /etc/shadow | awk -F: '{print $1}'

    then i locked some of users which were not required.
    Now how to find list of users which are locked .

    i tried a command for this

    # passwd -S -a | grep " L " | cut -d " " -f1
    but it respond as

    passwd: bad argument -a: unknown option



    how to find list of locked users ?? please sought a way to this..

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Possibly because there no -a option for the passwd command?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,229
    egrep -v '.*:\*|:\!' /etc/shadow | awk -F: '{print $1}'
    Can somebody please explain this?
    nujinini
    Linux User #489667

  4. #4
    Just Joined!
    Join Date
    Mar 2011
    Posts
    2

    Cool Locked users

    So what you suggest to get list of locked users.???

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...