Forum Discussion

Tom_K_185554's avatar
Tom_K_185554
Icon for Nimbostratus rankNimbostratus
Jan 26, 2018
Solved

tmsh command to list all users in all partitions

Hello, anyone know the tmsh command syntax to list all users in all partitions ? When I use "tmsh list auth user|grep auth" it will list all the users but only from the Common partition and when I try and incorporate the partition option in the command I cannot find a combination that works.

 

  • Greetings,

    If you have access to the advanced shell (bash), this should work:
      tmsh -c "cd /; list auth user"
    
    auth user bill {
        description bill
        encrypted-password !!
        partition Common
        partition-access {
            all-partitions {
                role no-access
            }
        }
        shell none
    }
    auth user john {
        description john
        encrypted-password !!
        partition Uncommon
        partition-access {
            all-partitions {
                role no-access
            }
        }
        shell none
    }
    

    Kevin

3 Replies

  • Kevin_K_51432's avatar
    Kevin_K_51432
    Historic F5 Account

    Greetings,

    If you have access to the advanced shell (bash), this should work:
      tmsh -c "cd /; list auth user"
    
    auth user bill {
        description bill
        encrypted-password !!
        partition Common
        partition-access {
            all-partitions {
                role no-access
            }
        }
        shell none
    }
    auth user john {
        description john
        encrypted-password !!
        partition Uncommon
        partition-access {
            all-partitions {
                role no-access
            }
        }
        shell none
    }
    

    Kevin

    • Tom_K_185554's avatar
      Tom_K_185554
      Icon for Nimbostratus rankNimbostratus

      thanks for your prompt reply, not sure how to accept multiple answers but this answer is completely accepted.

       

  • Go to / directory and list with recursive command

    cd /
    list auth user recursive    
    

    The object will display as

    auth user Part1/john {    
    

    The first / is missing with recursive arg