Nic Acton
  • My Gitbook
  • My Favorite Things
    • Podcasts
    • Newsletters
  • Monthly Summaries
    • May 2019
    • June 2019
  • Cloud Computing
    • Cloud Concepts
    • AWS
      • Certified Solutions Architect
      • Well Architected Framework
        • Operational Excellence
        • Reliability
        • Performance Efficiency
        • Cost Optimization
        • Security
      • Analytics
        • Elasticsearch Service
        • Kinesis
        • Elastic MapReduce (EMR)
      • Compute Services
        • Elastic Beanstalk
        • Elastic Container Service (ECS)
      • Deployment
        • CloudFormation
      • Application Services
        • Key Management Service (KMS)
        • Simple Queue Service (SQS)
        • API Gateway
        • Simple Work Flow (SWF)
        • Amazon MQ
        • Simple Notification Service (SNS)
      • Simple Storage Service (S3)
        • Macie
      • Databases
        • RDS
        • DynamoDB
        • ElastiCache
        • Neptune
        • Redshift
      • Cloudfront
      • IAM
      • Monitoring
        • Trusted Advisor
        • Amazon Inspector
        • AWS Config
        • AWS Shield
        • CloudWatch
          • VPC Flow Logs
        • CloudTrail
        • Guard Duty
      • Route53
      • Serverless Architectures
        • Lambda
      • VPC
        • Highly Available & Fault Tolerant VPCs
        • Hybrid Environments
          • VPC Peering
          • Direct Connect
        • Cloud HSM
    • GCP
    • Azure
    • HashiCorp
    • Red Hat
      • RHEL
        • Basics
        • Grep & Regex
        • SSH
      • Ansible
    • Tutorials/Guides
      • Linux
        • Admin
  • Software Engineering
    • Machine Learning
      • Deep Learning
        • Tensorflow
      • Training and Loss
    • Programming
      • APIs
    • Security
    • Web Development
      • OSI 7 Layer Model
    • Tutorials/Guides
      • Apache Server
    • Virtualization
      • Virtual Machines
      • Containers
      • Serverless
  • Fitness
    • Nutrition
      • Diets
      • Macronutrients
      • Supplements
      • Miscellaneous
    • Strength Training
    • BodyBuilding
  • Miscellaneous
    • Technology Ethics
      • Education
    • Interesting Concepts
      • Libertarian Paternalism
Powered by GitBook
On this page
  • User Administration
  • Secure Shell (SSH)

Was this helpful?

  1. Cloud Computing
  2. Tutorials/Guides
  3. Linux

Admin

User Administration

Add Users

$ useradd <username>

Make a Group

$ groupadd <groupname>

Make a User into a SuperUser

$ usermod -g wheel <username>

Get Information on a User

$ id <username>

Add User to Group

$ usermod -aG <groupname> <username>

Lock User Account

$ usermod -L <username>

Example: Web Admin Group

Setting up a user that can run a limited subset of commands with sudo, add a user to that group.

# Create a sudoers entry in the sudoers directory
$ sudo visudo -f /etc/sudoers.d/web_admin
# In the resulting file add the following to set the following allowed commands and user:
Cmnd_Alias WEB = /bin/systemctl restart httpd.service, /bin/systemctl reload httpd.service
<user> ALL=WEB

Secure Shell (SSH)

Generate a Key (on Control Station)

$ ssh-keygen

Copy the SSH key to a Workstation

$ ssh-copy-id <workstation_ip_or_localname>

Use SSH Agent for Persistent Key Usage

# Start your ssh agent
$ eval `ssh agent`
# Load your ssh private key
$ ssh-add <path to private key>
PreviousLinuxNextMachine Learning

Last updated 5 years ago

Was this helpful?