Welcome, Guest
Username Password: Remember me

List all the users in linux
(1 viewing) (1) Guest
Shell Script
  • Page:
  • 1

TOPIC: List all the users in linux

List all the users in linux 1 year, 4 months ago #499

  • rajeshkumar
  • OFFLINE
  • Moderator
  • I love software configuration management
  • Posts: 370
  • Points: 44590
  • Karma: 4
  • Honor Medal 2009
List all the users in Linux

cat /etc/passwd | cut -d":" -f1
Regards,
Rajesh Kumar
Build and Release Engineer
My Blog: community.scmgalaxy.com/pg/profile/rajeshkumar

Re: List all the users in linux 1 year, 2 months ago #605

  • rajeshkumar
  • OFFLINE
  • Moderator
  • I love software configuration management
  • Posts: 370
  • Points: 44590
  • Karma: 4
  • Honor Medal 2009
Some of other options are....


cat /etc/passwd | gawk 'FS=":" {print $1}'



ls /home



cat /etc/passwd | cut -d: -f 1,3,6 | grep "[5-9][0-9][0-9]" | grep "/home" | cut -d: -f1
Regards,
Rajesh Kumar
Build and Release Engineer
My Blog: community.scmgalaxy.com/pg/profile/rajeshkumar
  • Page:
  • 1
Time to create page: 0.69 seconds

     
    
Home Forum