Manually Creating a New User Account Presented by Carl South.

Slides:



Advertisements
Similar presentations
Unit 5 – User Administration Randy Marchany VA Tech Computing Center.
Advertisements

Linux Users and Groups Management
Basic Unix system administration
1 Introduction to UNIX Ke Liu
Race Condition Zutao Zhu 10/09/09. Outline Race Condition –Some functions –File format of /etc/passwd and /etc/shadow –Input Redirection Format-string.
1 The Attack and Defense of Computers Dr. 許 富 皓. 2 Passwords in Unix/Linux Systems.
Linux+ Guide to Linux Certification, Second Edition
CS 497C – Introduction to UNIX Lecture 36: - Customizing the Environment Chin-Chih Chang
Guide To UNIX Using Linux Third Edition
Introduction to Unix (CA263) Introduction to Shell Script Programming By Tariq Ibn Aziz.
Linux+ Guide to Linux Certification, Second Edition
Filesystem Hierarchy Standard (FHS) –Standard of outlining the location of set files and directories on a Linux system –Gives Linux software developers.
Help session: Unix basics Keith 9/9/2011. Login in Unix lab  User name: ug0xx Password: ece321 (initial)  The password will not be displayed on the.
Lesson 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
Introduction to Shell Script Programming
An introduction to Apache. Different Types of Web Servers Apache is the default web server for may Unix servers. IIS is Microsoft’s default web server.
Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks.
Managing User Accounts. Module 2 – Creating and Managing Users ♦ Overview ► One should log into a Linux system with a valid user name and password granted.
Agenda User Profile File (.profile) –Keyword Shell Variables Linux (Unix) filters –Purpose –Commands: grep, sort, awk cut, tr, wc, spell.
Linux+ Guide to Linux Certification, Second Edition
Adding New Users User as an entity - username(UID), GID. UID - typically a number for system to identify the user. GID – a number that recognizes a set.
IT2204: Systems Administration I 1 6b). Introduction to Linux.
Unix System Administration Chapter 6 Adding New Users.
Day 11 SAMBA NFS Logs Managing Users. SAMBA Implements the ability for a Linux machine to communicate with and act like a Windows file server. –Implements.
Module 4 - File Security. Security Overview File Ownership Access to Files and Dircetories Changing File and Directory Ownership Changing File and Directory.
Linux+ Guide to Linux Certification, Third Edition
Managing Users Objectives Contents Practicals Summary
ITI-481: Unix Administration Meeting 3 Christopher Uriarte, Instructor Rutgers University Center for Applied Computing Technologies.
Before we start…Getting Started. UST Outline History Getting Started Basic commands (command line) Operations on Files and Directories Input and Output.
Users Greg Porter V1.0, 26 Jan 09. What is a user? Users “own” files and directories Permission based on “ownership” Every user has a User ID (UID) 
There are three types of users in linux  System users: ?  Super user: ?  Normal users: ?
Managing Users  Each system has two kinds of users:  Superuser (root)  Regular user  Each user has his own username, password, and permissions that.
Chapter 3 & 6 Root Status and users File Ownership Every file has a owner and group –These give read,write, and execute priv’s to the owner, group, and.
Managing Users Objectives –to be able to add, modify and remove Unix user accounts Contents –requirements for a user account –configuration files (passwd,
Searching and Sorting. Why Use Data Files? There are many cases where the input to the program may come from a data file.Using data files in your programs.
Linux+ Guide to Linux Certification, Third Edition
Linux+ Guide to Linux Certification, Third Edition
Fall 2011 Nassau Community College ITE153 – Operating Systems Session 21 Administering User Accounts and Groups 1.
Λειτουργικά Συστήματα - Lab1 Γιάννης Πετράκης. The Operating System  Unix is a layered operating system  The innermost layer is the hardware that provides.
Executable scripts. So far We have made scripts echo hello #for example And called it hello.sh Run it as sh hello.sh This only works from current directory?
Lesson 3-Touring Utilities and System Features. Overview Employing fundamental utilities. Linux terminal sessions. Managing input and output. Using special.
1 Day 18 Bash and the.files. 2 The.files ls shows you the files in your directory –Or at least most of them. –Some files are hidden. Try: ls –a –This.
The Saigon CTT Chapter 10 Managing Users. The Saigon CTT  Objectives  Define the requirements for user accounts  Explain group and group accounts 
ITI-481: Unix Administration Meeting 3 Christopher Uriarte, Instructor Rutgers University Center for Applied Computing Technologies.
SCSC 455 Computer Security Chapter 3 User Security.
Module 1 - Introduction to Linux. Users must log-in Linux is case sensitive File and Directories naming conventions (No spaces!) Files and Directories.
Lecture – Users and groups
Linux Use the Command-Line Interface to Administer the System.
CSC414 “Introduction to UNIX/ Linux” Lecture 6. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
 Last lesson, the Windows Operating System was discussed along with the Windows command shell  Unix is a computer operating system, that similarly manages.
1 CS3695 – Network Vulnerability Assessment & Risk Mitigation – Introduction to Unix & Linux.
A Mini UNIX Tutorial. What’s UNIX?  An operating system run on many servers/workstations  Invented by AT&T Bell Labs in late 60’s  There are many different.
Managing Users CSCI N321 – System and Network Administration Copyright © 2000, 2011 by Scott Orr and the Trustees of Indiana University.
Experiment No 4 Prepared by, Mr. Satish Pise. Objectives View the /etc/passwd file and describe its syntax. View the /etc/shadow file and describe its.
Agenda Customizing a Unix/Linux account Environment Introduction to Start-up Files (.bash_profile,.bashrc,.profile,.kshrc) Safe Methods for Changing Start-up.
This slide deck is for LPI Academy instructors to use for lectures for LPI Academy courses. ©Copyright Network Development Group Module 14 Managing.
UNIX Basics Matt Hayward October 18, 2016 LS560 – Information Technology for information professionals.
Chapter 11: Managing Users
UNIX System Overview.
Chapter 2 User Management
Users and Accounts Lab 0.1. Users and Accounts Lab 0.1.
Linux Users and Groups Management
Adding New Users, Storage, File System
Unix Access Control Basic CE 2
COP 4343 Unix System Administration
OPS235 Lab4: Investigations 5 – 9
The Attack and Defense of Computers
Module 13 System and User Security
Adding New Users.
Presentation transcript:

Manually Creating a New User Account Presented by Carl South

When creating new user accounts, several steps must be followed Assign username, uid and primary group etc. Enter this information into /etc/passwd file Assign password to the account Create home directory for the user Place initialization files into user’s home dir Give the user ownership and access Testing the new account

The /etc/passwd file System’s master list of information about users Format for each user contains seven fields Simply use any text editor to open file and add another user Example:  name:coded-passwd:UID:GID:user information:home-dir:shell Note: It is always a good idea to save a copy of the unedited version so that you can recover from any errors

The /etc/passwd file Name - The user name assigned to the user. Most user names follow a certain pattern. My user name at work is csout0. Coded passwd - (Discussed later) UID - User ID: Each distinct user should have a unique user ID GID - Group ID: Determines the user’s primary group membership User Info - Usually contains the user’s full name. Also a comment field. Home Directory - User’s initial working directory Shell - The command interpreter used for the new user such as korn, bash, bourne etc.

There should be an asterisk ( * ) placed in this field when editing the /etc/passwd file. –Why? This prevents anyone from using this name to log in. Asterisks are not located in the target character field for passwords, so it can never be matched. Maintains system security if you are interrupted while creating the account. Passwords should never be assigned while editing the /etc/passwd file. The passwd command can be used later in the creation of the account. The /etc/passwd file (password field)

The /etc/passwd file Example of an entry in the /etc/passwd file csout0:*:30604:222:CarlSouth:/home/ahvap04/csout0:/bin/ksh

Assigning user passwords The next step is to assign an initial password for the new account. –Command: passwd username You will be prompted for the password twice. It will not appear on screen.

Assigning the home directory The next step is to create a home directory for the new account. –Command: mkdir /home/username Note: The directory created must match the directory name located in the sixth field of the new entry in the /etc/passwd file.

Login initialization files Initialization files vary with different shells that are used. The bash shell uses.bash,.login and.bashrc These files are typically located in the /etc/skel directory. These files must all be placed in the user’s home directory as part of the creation process.

Changing ownership of home directory After creating the user’s home directory, it is important to remember to change the ownership of the directory from root to the new user. –Command: chown -R username /home/username This command will change the ownership on the directory and all the files it contains.

Testing the account After changing ownership, you should log completely out and then log back in under the new account name using the password that was previously assigned. Check to see that everything is in working order, then switch user (su - root) back to root.

Testing the account Once you are back as root, create a pre-expired password for the new account. –Command: passwd -f username This will pre-expire the password, forcing the user to change it at the next login.

Automating the process A script can be created to automate this process. Lets say the script is called make_users. This script will make use of a command called useradd, which comes with many options. Make_users will take one argument on the command line that will be the username to be used in creating the account.

Automating the process Make_users useradd [ -u 100] -g student [ -G tty, other] -d /home/$1 -s /bin/ksh [ -c “comment field” ] [-k /etc/skel] -m $1 Option meanings: u: User ID g: Primary group G: Comma-separated list of secondary groups d: home directory path name s: shell c: Full name k: skeleton directory containing initialization files m: Defines the username

References Essential System Administration, 2nd. Ed.. O’Reilly & Associates, Inc. September Pg Unix System Administration. The Seale Group, Inc Training Module Three, Pg