Chapter 2 User Management

Slides:



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

Linux Users and Groups Management
Race Condition Zutao Zhu 10/09/09. Outline Race Condition –Some functions –File format of /etc/passwd and /etc/shadow –Input Redirection Format-string.
User Account Management WeeSan Lee. Roadmap Add An Account Delete An Account /etc/{passwd,shadow} /etc/group How To Disable An Account? Root Account Q&A.
SUSE Linux Enterprise Server Administration (Course 3037) Chapter 2 Manage User Access and Security.
Linux+ Guide to Linux Certification, Second Edition
Getting Started with Linux Linux System Administration Permissions.
Linux System Administration LINUX SYSTEM ADMINISTRATION.
1. This presentation covers :  User Interface Administration  Files System and Services Management 2.
Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks.
Unix System Administration Rootly Powers Chapter 3.
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.
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.
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.
Lesson 9-Setting and Using Permissions. Overview Describing file permissions. Using execute permissions with a file. Changing file permissions using mnemonics.
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.
Lecture 5: User Accounts & Directory Service Instructor: Dr. Najla Al-Nabhan
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.
Introduction to System Admin Sirak Kaewjamnong. 2 The system administration’s job  Adding a new user  Doing backup and restoring files from backups.
Managing Users Objectives –to be able to add, modify and remove Unix user accounts Contents –requirements for a user account –configuration files (passwd,
Fall 2011 Nassau Community College ITE153 – Operating Systems Session 21 Administering User Accounts and Groups 1.
Linux Based Networks University of Education Instructor: Muhammad Amer Irshad.
The Saigon CTT Chapter 10 Managing Users. The Saigon CTT  Objectives  Define the requirements for user accounts  Explain group and group accounts 
Manually Creating a New User Account Presented by Carl South.
© 2006 ITT Educational Services Inc. Linux Operating System :: Unit 3 :: Slide 1 Downloading and Installing Software yum pirut Bit Torrent rmp.
ITI-481: Unix Administration Meeting 3 Christopher Uriarte, Instructor Rutgers University Center for Applied Computing Technologies.
System Administration. Logging in as System Administrator System Admin login (aka superuser, aka root) –login id: root –Default PS1 prompt: # –Home directory:
Lecture – Users and groups
Working with users and Groups. 1. Manage users and group 2. Manage ownership, permissions, and quotas.
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.
SUSE Linux Enterprise Desktop Administration Chapter 9 Manage Users, Groups, and Permissions.
Chapter 6 Adding New Users. Computer Center, CS, NCTU 2 Steps to add a new user 1.Edit the password and group files >vipw, pw 2.Set an initial password.
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.
This slide deck is for LPI Academy instructors to use for lectures for LPI Academy courses. ©Copyright Network Development Group Module 14 Managing.
LINUX SYSTEM ADMINISTRATION
Lab 05 Firewalls.
Chapter 9 Shell Programming
Chapter 3 Maintaining Security
Chapter 5 Linux Services
Chapter 6 File Systems CSNB113 SYSTEM ADMINISTRATION
Chapter 11: Managing Users
Chapter 4 Booting and Shutdown
Ubuntu Working in Terminal
Linux Users and Groups Management
IS3440 Linux Security Unit 3 User Account Management
Systems Administration CSCI Fall 2016
Adding New Users, Storage, File System
Unix Access Control Basic CE 2
COP 4343 Unix System Administration
Security and File Permission
OPS235 Lab4: Investigations 5 – 9
LINUX SYSTEM ADMINISTRATION
System & Network Administration (MCSA & RHCSA)
The Attack and Defense of Computers
Module 13 System and User Security
Adding New Users Chapter 6.
Administering Users and Groups
Administering Users and Groups
Rootly Powers Chapter 3.
Adding New Users.
Chapter 6 Adding New Users
Presentation transcript:

Chapter 2 User Management CSNB113 SYSTEM ADMINISTRATION College of Information Technology Universiti Tenaga Nasional (UNITEN)

Objectives Examine /etc/group and /etc/passwd Create, modify, and delete user accounts with useradd, usermod, and userdel SN 2014

Types of account in Unix Root account This is also called superuser and Would have complete and unfettered control of the system Can run any commands without any restriction. This user should be assumed as a system administrator System accounts Needed for the operation of system-specific components for example mail accounts and the sshd accounts. Usually needed for some specific function on your system, and any modifications to them could adversely affect the system User accounts Provide interactive access to the system for users and groups of users. General users are typically assigned to these accounts and have limited access to critical system files and directories. Unix supports a concept of Group Account(groups a number of accounts) Every account would be a part of another group account. SN 2017

User ID (derives from actual name of the user) Overview Allocate System Administrator User Account User ID (derives from actual name of the user) Consists /etc/group /etc/passwd Where is every user is commonly represented? /etc/gshadow /etc/shadow SN 2017

/etc/group Contains the group information for each account Group database is maintained in /etc/group Contains GID; number and name A group compromises one or more members having a separate set of privileges A user has one primary group, AND may have one or more supplementary group All the default groups are system account specific groups and it is not recommended to use them for ordinary accounts SN 2017

root::0:root /etc/group Run command : cat /etc/group Field 1: name GID Field 2: blank or x  hardly used today Field 3: numeric GID Field 4: list of user for which this is their supplementary group SN 2017

/etc/group root user’s supplementary group root::0:root Line1 staff::1: Line2 bin::2:root,bin,daemon Line3 sys::3:root,bin,sys,adm Line4 lp::8:root,lp,adm Line5 Line 1: num. GID = 0, name GID = root, supplementary group for root user Line 2: num. GID = 1, name GID = staff, no user has staff as supplementary group. Line 3: num. GID = 2, name GID = bin, supplementary group for root, bin and daemon user Line 4 & 5? SN 2017

/etc/shadow & /etc/gshadow /etc/shadow − Holds the encrypted password of the corresponding account. Not all the systems support this file. /etc/gshadow − This file contains secure group account information. SN 2017

/etc/shadow For every line in /etc/passwd, there’s a corresponding entry in /etc/shadow sn010101:2u6VExtjjXHFk:12285:::::: Password Encryption SN 2017

/etc/passwd Store all user information except password encryption /etc/passwd and /etc/shadow – use by login and passwd programs – for login authentication SN 2017

/etc/passwd Numeric UID Comment or GCOS Login shell Username sn010101:x:210:241:Surizal Nazeri:/home/sn010101:bin/ksh Password field (not used) Numeric GID Home Directory SN 2017

/etc/passwd Username: name use to log on sn010101:x:210:241:Surizal Nazeri:/home/sn010101:bin/ksh Username: name use to log on Password: no longer store user password. Replaced by x UID: numerical user identification (unique) GID: user’s numerical group identification Comment or GCOS: user details Home directory: default initial location when logging in Login shell: the first program executed after logging in SN 2017

Adding a User useradd command: add user to the system Also creates user’s mailbox – set MAIL variable to point to /var/mail or /var/spool/mail # useradd –u 210 –g dba –c “Surizal Nazeri” \ –d /home/sn010101 –s /bin/ksh –m sn010101 Options: -u: UID -g: GID -c: Comment or GCOS -d: default initial location when logging in -s: Login shell -m: ensure create home directory SN 2017

Adding a group groupadd command: add group to the system # groupadd -g 123 mygroup Options: -g: GID -o: This option permits to add group with non-unique GID -r: This flag instructs groupadd to add a system account -f: This option causes to just exit with success status, if the specified group already exists. g: If the specified GID already exists, other (unique) GID is chosen SN 2017

Modifying Users usermod command: modify some of the parameters set with useradd – for example login shell (/bin/bash) Same arguments as the useradd command, plus the -l argument, which allows you to change the account name # usermod -d /home/sn010101 -m -l sn010101 sn020202 SN 2017

Modifying group To modify a group, use the groupmod syntax Here is how you will change the mygroup GID to 234 # groupmod -n new_groupname old_groupname # groupmod -g 234 mygroup SN 2017

Removing Users userdel command: remove user from the system including data in /etc/passwd and /etc/group Remove user Remove user together with their home directory # userdel sn010101 # userdel –r sn010101 SN 2017

Removing group Delete an existing group, all you need is the groupdel command and the group name # groupdel mygroup SN 2017

References Das, S. (2012). Your UNIX/LINUX The Ultimate Guide: Third Edition. McGraw-Hill Hahn, H. (2008). Harley Hahn's Guide to Unix and Linux. California: McGraw-Hill Higher Education SN 2017