Module 13 System and User Security

Slides:



Advertisements
Similar presentations
Linux Users and Groups Management
Advertisements

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.
Chapter 2 Accessing Your System and the Common Desktop Environment.
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.
User Accounts and Permissions Chapter IV / Part II.
SUSE Linux Enterprise Server Administration (Course 3037) Chapter 2 Manage User Access and Security.
Linux+ Guide to Linux Certification, Second Edition
1. This presentation covers :  User Interface Administration  Files System and Services Management 2.
Workbook 3 Users and Groups
Advanced Shell Programming. 2 Objectives Use techniques to ensure a script is employing the correct shell Set the default shell Configure Bash login and.
Introduction to Linux Installing Linux User accounts and management Linux’s file system.
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.
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.
System Administration 1.  system administration  user and group management 2.
Chapter 10: Rights, User, and Group Administration.
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,
Λειτουργικά Συστήματα - Lab1 Γιάννης Πετράκης. The Operating System  Unix is a layered operating system  The innermost layer is the hardware that provides.
Lab 3 + Using the Terminal 1. "Under Linux there are GUIs (graphical user interfaces). where you can point and click and drag, and hopefully get work.
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.
SCSC 455 Computer Security Chapter 3 User Security.
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.
1. Edit the password and group files > vipw(8), pw(8) 2. Set an initial password > passwd lwhsu 3. Set quota > edquota [-u] lwhsu 4. Create user home.
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.
1 CS3695 – Network Vulnerability Assessment & Risk Mitigation – Introduction to Unix & Linux.
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.
V 0.1Slide 1 Security - User Account How to maintain user account ? Access Control Other Information Configuration  maintain user group and access rights.
UNIX Command RTFM: sudo(8)
Module X (Unix/Linux Password Security)
Lab 05 Firewalls.
Chapter 11: Managing Users
UNIX System Overview.
Chapter 2 User Management
Introduction to UNIX.
Linux Users and Groups Management
IS3440 Linux Security Unit 3 User Account Management
Using the Terminal Lab 3+.
Adding New Users, Storage, File System
Unix Access Control Basic CE 2
COP 4343 Unix System Administration
OPS235 Lab4: Investigations 5 – 9
Chapter Introduction 3.2 The UNIX Model of Ownership
Linux Shell Script Programming
The Attack and Defense of Computers
Administering Users and Groups
Administering Users and Groups
Rootly Powers Chapter 3.
Adding New Users.
Chapter 6 Adding New Users
Presentation transcript:

Module 13 System and User Security

Exam Objective 5.1 Basic Security and Identifying User Types Objective Summary Working with Root and Standard Users System Users

User accounts and passwords

User accounts Files in the /etc directory contain account data. The /etc/passwd file defines some of the account information for user accounts.

The /etc/passwd file Each line of the /etc/passwd file relates to a user account. Each line is separated into fields by colon characters. The fields from left to right are as follows: name:password placeholder:user id:primary group id:comment:home directory:shell

The /etc/passwd file Field Example Description name root This is the name of the account. password placeholder x The x in the password placeholder field indicates to the system that the password is not stored here, but rather in the /etc/shadow file. user id Each account is assigned a user ID (UID). primary group id When a user creates a file, the file is owned by a group id (GID), the user's primary GID. comment This field can contain any information about the user, including their real (full) name and other useful information.. home directory /root This field defines the location of the user's home directory. shell /bin/bash This is the location of the user's login shell.

The /etc/shadow file Contains account information related to the user's password. The fields of the /etc/shadow file are: name:password:lastchange:min:max:warn:inactive:expire:reserved

The /etc/shadow file Field Example Description name sysadmin This is the name of the account, which matches the account name in the /etc/passwd file. password $6$.........rl1 The password field contains the encrypted password for the account. last change 15020 This field contains a number that represents the last time the password was changed. min 5 The password can't be changed again for the specified number of days. max 30 This field is used to force users to change their passwords on a regular basis warn 7 If the max field is set, the warn field indicates that the user would be "warned" when the max timeframe is approaching. inactive 60 The inactive field provides the user with a "grace" period in which their password can be changed. expire 15050 This field represents the number of days from January 1, 1970 and the day the account will "expire".

Viewing Account Information

Viewing account information To see the account information for the user name named "sysadmin", use the grep sysadmin /etc/passwd command: Another technique is the getent command:

Viewing login information To verify your identity you can execute the id command:

System Accounts

System accounts System accounts are designed to provide accounts for services that are running on the system. Have UIDs between 1-499 Have non-login shells in /etc/passwd Have * in password field of /etc/shadow Most are critical for system operation. Only delete a system account when 100% certain it is not needed.

System Groups

Group accounts Each user can be a member of one or more groups. The /etc/passwd file defines the primary group membership for a user. Supplemental group membership is defined in the /etc/group file. Either the grep or getent commands can be used to display group information.

The /etc/group file Each group is defined by this file. A colon delimited file with the following fields: group_name:password_placeholder:GID:user_list Field Example Description group_name mail This field contains the group name. password_placeholder x The "x" in this field is used to indicate that the password is stored in the /etc/gshadow file. GID 12 Each group is associated with a unique Group ID (GID) which is placed in this field. user_list mail,postfix This last field is used to indicate who is a member of the group.

Changing groups Create a file that owned by one of your secondary groups by using: newgrp group_name Opens a new shell with new primary group. Use id command to verify new primary group. Use exit command to return to previous shell. May be disabled due to group passwords.

Changing the group ownership of an existing file Change group ownership of existing file by using: chgrp group_name file_name Only allowed to change group ownership of files you own. Must also be a member of the new group.

Working with root

Logging in as root Logging in directly to root account poses a security risk. Instead, use the su or sudo command.

Using the su command The su command opens a new shell as a different user. (UID changes, but doesn’t assume all env.) Example: su user1 To sign in as if the user had executed a login session Example: su - user1 Often used to run commands as the root user. Use the –l option for a full login shell. The root user is the default user. Use exit command to return to original shell.

sudo Command

Using the sudo command The sudo command allows you to execute a single command as a different user. Must be set up by installation program or manually after install. Prompts user for their own password.

Setting up the sudo command Configuration is in the /etc/sudoers file. Modify this file with the visudo command. Uses vi/vim editors by default. Use the following to modify default editor: export EDITOR=gedit Entry to provide user bob rights to run commands as root user: Bob ALL=(ALL) ALL

who and w Command

Using the who command Displays a list of users who are currently logged in: [sysadmin@localhost ~]$ who root tty2 2013-10-11 10:00 sysadmin tty1 2013-10-11 09:58 (:0) sysadmin pts/0 2013-10-11 09:59 (:0.0) sysadmin pts/1 2013-10-11 10:00 (example.com) Column Example Description username root Name of the user who is logged in. terminal tty2 This column indicates which terminal window the user is working in. date 2013-10-11 10:00 (example.com) This indicates when the user logged in.

Using the w command Displays detailed user and system information: [sysadmin@localhost ~]$ w 10:44:03 up 50 min, 4 users, load average: 0.78, 0.44, 0.19 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT root tty2 - 10:00 43:44 0.01s 0.01s -bash sysadmin tty1 :0 09:58 50:02 5.68s 0.16s id sysadmin pts/0 :0.0 09:59 0.00s 0.14s 0.13s who sysadmin pts/1 example.com 10:00 0.00s 0.03s 0.01s w

Using the w command Column Example Description USER root This column indicates the name of the user who is logged in. TTY tty2 This column indicates which terminal window the user is working in. FROM example.com Where the user logged in from. LOGIN@ 10:00 When the user logged in. IDLE 43:44 How long the user has been idle since the last command they ran. JCPU 0.01s The total cpu time (s=seconds) used by all processes (programs) run since login. PCPU The total cpu time for the current process. WHAT -bash The current process that the user is running.