Adding a CLI-only (Command Line Interface) user
search cancel

Adding a CLI-only (Command Line Interface) user

book

Article ID: 401057

calendar_today

Updated On:

Products

Security Analytics

Issue/Introduction

A local account for command line only may be needed for STIG purposes or for a third party application. 

Resolution

  1. Login as root
  2. Run the following commands:
    1. dsadduser localadmin
    2. usermod -aG wheel localadmin
    3. passwd localadmin
    4. echo 'localadmin' >> /etc/shell.allow
    5. nscd -i group; nscd -i passwd

This will allow the user localadmin to login directly, but without root privileges.