Shell Scripting: User and Account Creation

Difficulty: Beginner
Duration: 2 minutes and 47 seconds
Students: 742
Rating: 5/5

In this lesson, you'll learn how to create new user accounts. In that script, you're going to make sure the person who executes the script has the proper privileges to do so and you're going to make sure the specified account was created successfully. After that, you're going to expand it and make it better by automatically generating random passwords, accepting command line arguments, and so on. You'll learn all the concepts and techniques to build that script and complete your first project.

This lesson is part of the Linux Shell Scripting course. To follow along with this lesson, you can find all the necessary resources here.

Learning Objectives

  • Get started with naming, permissions, variables, and built-ins
  • Learn about special variables created by the shell, how to store the output of a command in a variable, and learn about if statements
  • Learn about exit Statuses, return codes, and string test conditionals
  • Learn how to get input from the person executing the script and how to create an account on a Linux system

Intended Audience

  • Anyone who wants to learn Linux shell scripting 
  • Linux system administrators, developers, or programmers

Prerequisites

To get the most out of this lesson, you should have a basic understanding of the Linux command line.