Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

listing users?

  • 20-05-2008 04:27PM
    #1
    Closed Accounts Posts: 1,788 ✭✭✭


    How do i get a list of users in a bash shell ?


Comments

  • Registered Users, Registered Users 2, Paid Member Posts: 3,519 ✭✭✭ethernet


    Try the commands:
    • w
    • who
    • finger


  • Closed Accounts Posts: 1,788 ✭✭✭jackdaw


    sorry i meant users, not just users logged on at the moment,
    I mlooking to see cron tabs and root has none, so i need to search for
    cron tabs under other users...


  • Closed Accounts Posts: 6,151 ✭✭✭Thomas_S_Hunterson


    You could list the home folders


  • Closed Accounts Posts: 7,562 ✭✭✭leeroybrown


    For an authoritative listing of available user accounts the getent command is you friend:
    getent passwd
    

    It's far better practice to use it (and the programatic getent calls) than the password file as it gets it data from NSS which will include all sources of accounts (incl. files, ldap, nis).

    As you're just interested in crontabs then they're all spooled:
    ls -l /var/spool/cron/crontabs/
    

    Note that there might also be spool files for 'at' jobs in the cron spool directory too.


Advertisement