Race Condition Zutao Zhu 10/09/09. Outline Race Condition –Some functions –File format of /etc/passwd and /etc/shadow –Input Redirection Format-string.

Slides:



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

The Unix File System. What are the three parts of every file on a Unix filesystem? And where is each stored? Filename - stored in directories Inode -
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.
Chapter 6 Adding New Users. Computer Center, CS, NCTU 2 Steps to add a new user 1.Edit the password and group files >vipw 2.Set an initial password >passwd.
Guide To UNIX Using Linux Third Edition
Linux+ Guide to Linux Certification, Second Edition
Getting Started with Linux Linux System Administration Permissions.
Linux System Administration LINUX SYSTEM ADMINISTRATION.
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 Operating System Security Chapter 4 Account-based Security.
Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks.
Unix System Administration Rootly Powers Chapter 3.
Unix Operating Systems Module 7. Unix Operating System Versions Basic Information User and Group Settings File Permissions Local Firewall Local Security.
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.
..\..\Local Settings\Temporary Internet Files\Content.IE5\WL2C8E1D\j [1].jpg.
..\..\Local Settings\Temporary Internet Files\Content.IE5\WL2C8E1D\j [1].jpg.
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.
Week Eleven Agenda Link of the week Review week ten lab assignment Week ten expected outcomes Next lab assignment Break-out problems Upcoming deadlines.
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) 
Week Eleven Agenda Announcements Link of the week Review week ten lab assignment Week ten expected outcomes Next lab assignment Break-out problems Upcoming.
Managing Users  Each system has two kinds of users:  Superuser (root)  Regular user  Each user has his own username, password, and permissions that.
..\..\Local Settings\Temporary Internet Files\Content.IE5\WL2C8E1D\j [1].jpg.
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,
Linux+ Guide to Linux Certification, Third Edition
Linux+ Guide to Linux Certification, Third Edition
Homework #1: C++ Basics, Flow of Control, and Function Basics By J. H. Wang Mar. 13, 2012.
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.
Password. On a Unix system without Shadow Suite, user information including passwords is stored in the /etc/passwd file. Each line in /etc/passwd is a.
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.
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.
LAB 4 Managed Switches. Lab Reports  Must have proper cover!  Include the Lab Section # you are in on the 2 nd line! E.g. ITIS 2110L-L05  The Lab Name.
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.
Understanding Passwords ● Jonathan Schipp ● Dubois County Linux User Group ● Nov 7 th 2010 ● jonschipp (at) gmail.com.
LINUX SYSTEM ADMINISTRATION
Module X (Unix/Linux Password Security)
System Programming and administration CS 308
Chapter 11: Managing Users
UNIX System Overview.
Chapter 2 User Management
IS3440 Linux Security Unit 3 User Account Management
Adding New Users, Storage, File System
Unix Access Control Basic CE 2
COP 4343 Unix System Administration
OPS235 Lab4: Investigations 5 – 9
LINUX SYSTEM ADMINISTRATION
Chapter Introduction 3.2 The UNIX Model of Ownership
Module 13 System and User Security
Administering Users and Groups
Administering Users and Groups
Adding New Users.
Chapter 6 Adding New Users
Presentation transcript:

Race Condition Zutao Zhu 10/09/09

Outline Race Condition –Some functions –File format of /etc/passwd and /etc/shadow –Input Redirection Format-string (if time allowed)

Functions unlink() and symlink() fstat() seteuid()

File Format of /etc/passwd

Username: It is used when user logs in. It should be between 1 and 32 characters in length. Password: An x character indicates that encrypted password is stored in /etc/shadow file. User ID (UID): Each user must be assigned a user ID (UID). UID 0 (zero) is reserved for root and UIDs 1-99 are reserved for other predefined accounts. Further UID are reserved by system for administrative and system accounts/groups. Group ID (GID): The primary group ID (stored in /etc/group file) User ID Info: The comment field. It allow you to add extra information about the users such as user's full name, phone number etc. This field use by finger command. Home directory: The absolute path to the directory the user will be in when they log in. If this directory does not exists then users directory becomes / Command/shell: The absolute path of a command or shell (/bin/bash). Typically, this is a shell. Please note that it does not have to be a shell.

File Format of /etc/shadow

User name : It is your login name Password: It your encrypted password. The password should be minimum 6-8 characters long including special characters/digits Last password change (lastchanged): Days since Jan 1, 1970 that password was last changed Minimum: The minimum number of days required between password changes i.e. the number of days left before the user is allowed to change his/her password Maximum: The maximum number of days the password is valid (after that user is forced to change his/her password) Warn : The number of days before password is to expire that user is warned that his/her password must be changed Inactive : The number of days after password expires that account is disabled Expire : days since Jan 1, 1970 that account is disabled i.e. an absolute date specifying when the login may no longer be used

Input Redirection./vulp < input You don’t need to use keyboard to provide the input for scanf(). Use the content of “input”.

Note Remember to save a copy of /etc/passwd and /etc/shadow to other directory Before you reboot, make sure that /etc/passwd and /etc/shadow are correct

Reference etcpasswd-file-format/ etcpasswd-file-format/ etcshadow-file/ etcshadow-file/