Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

listing users?

  • 20-05-2008 3: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 Posts: 3,568 ✭✭✭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,563 ✭✭✭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