Support Support Downloads Knowledge Base Juniper Support Portal Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[EOL/EOE] [NSM] How to create an unprivileged user to collect system statistics via the CLI



Article ID: KB22897 KB Last Updated: 18 Oct 2020Version: 2.0
Note: A product listed in this article has either reached hardware End of Life (EOL) OR software End of Engineering (EOE).  Refer to End of Life Products & Milestones for the EOL, EOE, and End of Support (EOS) dates.
This article provides information on how to create an unprivileged user to collect system statistics via the CLI login.
A customer requires the following:
  • Collect system statistics on the NSM server via the CLI

  • The statistics is similar to the df-h, free, and so on.

  • It can be collected via a script, which runs all of the commands.

  • Creation of an unprivileged user to logon for collecting the statistics; admin user should not be used to complete this task.

 No such user exists on the NSMXpress.
Create the unprivileged user:
  1. Logon to the NSMXpress CLI as an admin:
    ssh admin@<NSMXpress IP address>

  2. Switch to the root:
    sudo su -

  3. Type the admin password.

  4. Create the new user:
    useradd <username>
      (noprivtest was used as the user name in this example)

  5. Put the new user in the wheel group:
    usermod -g wheel noprivtest

  6. Set a password for the new user:
    passwd noprivtest

To logon as an unprivileged user (noprivtest) and run the required commands, perform the following procedure:
  1. Logon to the NSMXpress CLI:
    ssh noprivtest@<NSMXpress IP address>

  2. Switch to the root:
    sudo su -

  3. Type the password (for user - noprivtest) .

  4. Execute the command string(s).

  5. Exit the root.

  6. Exit the CLI.


Modification History:
2020-10-18: Tagged article for EOL/EOE.
Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search