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.

Slides:



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

Linux Users and Groups Management
Unix/Linux basics user management Operating systems lab Gergely Windisch room 4.12
Lecture 2 Shell environment I: - command line interface & basic commands; - directories & files; - standard I/O & file descriptors; CSE4251 The Unix Programming.
Linux File & Folder permissions. File Permissions In Ubuntu, files and folders can be set up so that only specific users can view, modify, or run them.
File Security. Viewing Permissions ls –l Permission Values.
Chapter 10 File System Security. Security Policies security policies are doors maintain a balance between total access and total security UNIX has two.
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.
Linux+ Guide to Linux Certification, Second Edition
User Accounts and Permissions Chapter IV / Part II.
CS 497C – Introduction to UNIX Lecture 15: - File Attributes Chin-Chih Chang
SUSE Linux Enterprise Server Administration (Course 3037) Chapter 2 Manage User Access and Security.
Lecture 02CS311 – Operating Systems 1 1 CS311 – Lecture 02 Outline UNIX/Linux features – Redirection – pipes – Terminating a command – Running program.
Linux+ Guide to Linux Certification, Second Edition
Linux File Security. What is Permission ? Specifies what right are granting to users to access the resources available in the computer. So that important.
L INUX C OMMAND L INE I NTERFACE G UNAANBAN.G
Unix/Linux basics 0011 Operating systems lab Gergely Windisch room 4.12
Filesystem Hierarchy Standard (FHS) –Standard of outlining the location of set files and directories on a Linux system –Gives Linux software developers.
Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks.
Unix Accounts. 17/09/20152 Unix Accounts To access a Unix system you need to have an account. Unix account includes: username and password userid and.
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.
File Permissions. What are the three categories of users that apply to file permissions? Owner (or user) Group All others (public, world, others)
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.
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
File Permission and Access. Module 6 File Permission and Access ♦ Introduction Linux is a multi-user system where users can assign different access permission.
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) 
Linux Security. See who's logged in 1) w (more information) 2) who (less information)
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.
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,
Linux+ Guide to Linux Certification, Third Edition
Linux+ Guide to Linux Certification, Third Edition
Linux Based Networks University of Education Instructor: Muhammad Amer Irshad.
1 Begin to use Linux. 2 Background  Linux is an operating system similar to UNIX. It runs on many different computers and was first released in 1991.
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.
CSCI 530 Lab Authorization. Review Authentication: proving the identity of someone Passwords Smart Cards DNA, fingerprint, retina, etc. Authorization:
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.
This slide deck is for LPI Academy instructors to use for lectures for LPI Academy courses. ©Copyright Network Development Group Module 14 Managing.
Linux Filesystem Management
LINUX SYSTEM ADMINISTRATION
Basic Commands ls cp ls –l (in detail format) echo ls –a
Chapter 11: Managing Users
Ubuntu Working in Terminal
Chapter 2 User Management
Linux Users and Groups Management
Systems Administration CSCI Fall 2016
Adding New Users, Storage, File System
COP 4343 Unix System Administration
Security and File Permission
The Linux Command Line Chapter 9
System & Network Administration (MCSA & RHCSA)
Administering Users and Groups
Administering Users and Groups
Adding New Users.
Presentation transcript:

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 syntax. View the /etc/group file and describe its syntax. Create users, groups.Set permissions and ownership.

Useradd command Syntax - #useradd username options 1. How to Add a New User in Linux #useradd cse #passwd cse.. Once a new user created, it’s entry automatically added to the ‘/etc/passwd‘ file

Examples – Create a User with Different Home Directory # useradd -d /home/ty tycse Create a User with Specific User ID useradd -u 999 sp Create a User with Specific Group ID #useradd -u g 500 poly #id tycse #id poly #groupadd admins,webadmin,developers Add a User to Multiple Groups #useradd -G admins,webadmin,developers cse Create a User with Account Expiry Date # useradd -e cse Create a User with Password Expiry Date # useradd -e f 45 cse

Add a User without Home Directory #useradd -M satish #ls -l /home/satish Practice Change User Login Shell: # useradd -s /sbin/nologin tecmint # tail -1 /etc/passwd Add a User with Specific Home Directory, Default Shell and Custom Comment # useradd -m -d /var/www/ravi -s /bin/bash -c “cse Owner" -U ravi

Usermod Command Syntax - usermod [options] LOGIN Adding Comment to User Account # usermod -c "This is cse" cse Change User Home Directory # mkdir poly # usermod -d //poly/cse Set User Account Expiry Date # usermod -e cse # chage -l cse Change User Primary Group # usermod -g babin tecmint_test # id tecmint_test Adding Group to an Existing User # usermod -G tecmint_test0 tecmint # id tecmint

Change User Login Name # usermod -l developers programmer Deleting User using Userdel Syntax – #userdel username # userdel -r cse

Creating new groups Syntax - groupadd [options] group Example – #groupadd newgroup Modifying groups Syntax - groupmod [options] GROUP Examples : 1. Change the group “admins” to “cseaddmins”. # groupmod -n cseadmins admins 2. Change groupid of a group This command changes the groupid of cseadmins group to 777 # groupmod -g 777 cseadmins

Groupdel Command Delete a user security group. Syntax- groupdel group Example – #groupdel poly

Default File Permission # touch newfile # ls -al newfile Changing permissions using chmod command Following are the symbolic representation of three different roles: u - is for user, g - is for group, o - is for others. Following are the symbolic representation of three different permissions: r - is for read permission, w - is for write permission, x - is for execute permission.

Add single permission to a file/directory #chmod u+x filename Add multiple permission to a file/directory #chmod u+r,g+x filename Remove permission from a file/directory #chmod u-rx filename Change permission for all roles on a file/directory #chmod a+x filename Apply the permission to all the files under a directory recursively #chmod -R 755 directory-name Change execute permission only on the directories #chmod u+x *

Changing ownership using chown command Syntax -chown options owner[.group] file You can specify either the login name or the numeric UID for the new owner of the file: Syntax - chown options user:group file/folder #man chown #chown dan newfile # ls -l newfile

Change the owner of a file # chown root tmpfile Change the group of a file # chown :friends tmpfile Change both owner and the group # chown himanshu:friends tmpfile Change owner only if a file is owned by a particular user # chown --from=guest himanshu tmpfile # chown --from=root himanshu tmpfile Copy the owner/group settings from one file to another # chown --reference=file tmpfile