CS/CIS 249 SP18 - Intro to Information Security

Size: px
Start display at page:

Download "CS/CIS 249 SP18 - Intro to Information Security"

Transcription

1 Lab assignment CS/CIS 249 SP18 - Intro to Information Security Lab #2 - UNIX/Linux Access Controls, version 1.2 A typed document is required for this assignment. You must type the questions and your responses in your favorite word processor or text editor. Be sure to put your name, date, and the phrase UNIX/Linux Access Controls on the top of the first page of your document. Submit your completed document to Canvas. UNIX/Linux File hierarchy The UNIX/Linux file system is organized as a hierarchy with the root (/) at the highest level. The hierarchy may be visualized as a tree with the root at the top and branches extending downward. This hierarchical scheme is common to many systems including MS-Windows, Apple, Android, and UNIX/Linux. Typically, some of the directories that may occur under the root in UNIX/Linux are usr, bin, sbin, home, var, boot, dev, and etc. In the figure shown below, user1 and user2 are sub-directories under home. hello.txt is a plain-text file and link hello is a link that points to hello.txt. Ownership and Permissions Ownership of files in UNIX/Linux can be granted in three categories: owner (creator), group, or others. Using this simple notion of ownership access to files can be controlled associating unique user ID (UID) and group ID (GID) with twelve permission bits for each file. Typically these bits are divided into three sets of three bits and three extra bits as shown in table below. r, w and x bits stand for read, write and execute bits for each of the owner, group and others permissions. su, sg and t stand for set user id, set group id and sticky bit. These 4 sets of bits are often represented as octal digits. For example the binary setting is 4755 in octal notation. When the su bit is set the UID of the process will be the owner of the file. Similarly, if sg is set, the GID of the process will be the group of the file. 1

2 Getting help on UNIX/Linux commands UNIX/Linux has an extensive online documentation for system commands. The system software documentation is organized in a set of manual pages called man pages. The manuals are arranged into sections as follows: 1 General commands (tools and utilities) 2 System calls and error numbers 3 Library functions for programmers 3p perl programmer s reference 4 Device drivers 5 File formats 6 Games 7 Miscellaneous information 8 System maintenance and operation commands 9 Kernel internals You may search the man pages with the apropos command. For example, to search man pages for help on setting up and maintaining users you would type apropos users and the command prompt. To read a particular man page, for example the useradd page, type man useradd at the command prompt. Th navigate the man page use the PAGE UP and PAGE DOWN keys or the and keys. Type q to quit (exit) the man page or scroll all the way to the bottom to automatically exit. 2

3 Lab activity Exercise 1.1: Setting up File Structure and User space The objective of this first exercise is to setup the file hierarchy structure shown in the figure above and the user accounts that are required for the remaining exercises. The su command is used to switch users. After you su to a user, perform the required actions and then type exit to return to the root user. Typically, su is used to temporarily elevate your privileges from a regular (restricted) user to the administrator in order to perform some administrative task. However, it can also be used to temporarily become another user to complete a task. You may learn more about the su command and the sudo command by reading the respective manual pages. Note that our VM, OpenBSD, has replaced sudo with a command called doas. The MS-Windows equivalent of su is called runas. These exercises will introduce several new UNIX/Linux commands. You may wish to read the system manual (help) on the commands in order to understand what each command does. To read the man page for a command, type man followed by the name of the command. For example to read about the switch user command su, type man su. You may use the arrow keys or the Page-Up and Page-Down keys to navigate the man page. When you want exit the man page, type the letter q. Complete the following tasks to create the environment: 1. Login to the VM with the username root and the password infosec2016. Note that no text will appear as you are typing the password. Think about why a login would be designed this way. 2. Use the useradd command to create two new users, user1 and user2 as follows: a. useradd -m -G users user1 b. useradd -m -G users user2 The G option adds a secondary group to the user and the m option creates the user s home directory. The new user won t be able to login yet though because they don t have a password. 3. Use the passwd command to set the password for the users you created (required in the case you want to log in). For convenience, set both passwords to the same value MyUserPass88. You need to retype the passwords and ignore any password warnings (note: no text will appear as you type): a. passwd user1 b. passwd user2 4. Check user information with the id command. Note the uid, gid for each output. a. id user1 b. id user2 5. Create the following directory structure: a. mkdir /test b. mkdir /test/temp (Hint: read the man page for how to create both directories in one step) 3

4 Next, we ll switch between users and check what privileges we have. To switch users use th esu command. The dash following the command means we want to niherit the user s full environment just the same as if we logged in as that user. You may find out more about the su command by typing man su at the command prompt. 6. Switch user roles to user1 and then back to root using the su command: a. whoami b. id c. su - user1 d. whoami e. id f. exit g. whoami h. id Notice that the prompt changes between a # and $. 7. Create a new file as the root user: a. touch /home/user2/helloworld b. ls -l /home/user2/helloworld What is the owner (UID) and group (GID) of the new file? The utility ls is used to list files. To see the privileges, owner, group, and other information about each file or directory use a long listing by typing ls -l (ell ess followed by a space, a dash, and a lower case ell). Note the parameter is not the digit one (1), it is a lower case L. 8. Change the group ownership and the user ownership of the file: a. chgrp users /home/user2/helloworld b. chown user2 /home/user2/helloworld c. ls -l /home/user2/helloworld What is the owner (UID) and group (GID) of the file now? 4

5 Exercise 1.2: Differences in File and Folder Permissions The objective of the following exercise is to observe the differences between file and folder (directory) permissions. The chmod command will be used to change file and directory permission to demonstrate the differences in permission bits for files and directories. 1. Observe the result of ls and cd commands: a. cd / b. ls -l c. ls -al /home What are the permissions for user1, user2 and test directories? Next, we ll use the pwd command to determine our present working directory and the shell s cd command to change directory. Use the man pages to find out more with man pwd. 2. Observe the result of ls and cd commands: a. su - user1 b. pwd c. ls -al /home/user2 d. cd /home/user2 e. pwd f. ls -al /home/user2 g. exit Could you list the /home/user2 directory as user1? Could you change to the /home/user2 directory as user1? To change the permissions on a file, use the chmod change mode command. The permissions may be described in several formats. We ll use the octal format described on page Change directory permissions of user2 directory and try again as user1 : a. chmod 740 /home/user2 b. Repeat steps 2a to 2g (Can you list or change directory now?) c. chmod 750 /home/user2 d. Repeat steps 2a to 2g (Can you list or change directory?) e. chgrp users /home/user2 f. Repeat steps 2a to 2g (Can you list or change directory?) g. chgrp user2 /home/user2 h. chmod 755 /home/user2 5

6 4. Create a file in another user s home folder. 1. su - user1 2. touch /home/user2/hello12.txt (Can you create new file? What are the rights?) 3. exit 4. chmod 777 /home/user2 5. su - user1 6. Repeat step 4b. (Can you create new file? What are the rights?) 7. ls -l /home/user2 8. exit 9. chmod 755 /home/user2 Alternative syntax for chmod command Suppose we want to set the access permissions for the file hello.txt to: set the su bit only, allow all access permissions to the owner, read and execute rights to the group, and only read rights to others. In other words, the 12 bit permission setting on the file hello.txt in binary would be We can set these permissions many different ways according to the chmod man page: 1. chmod 4754 hello.txt 2. chmod u+srwx,g+rx,o+r hello.txt 3. chmod u=srwx,g=rx,o=r hello.txt If you want to try these settings be sure to cd /home/user2 first, then touch hello.txt to create the file. Use ls -l to see the change in permissions. When you re done, change back to the root directory by typing cd (cd without a path returns the user to their home folder). 6

7 Exercise 1.3: New text files and linking files In order to understand how links work in UNIX/Linux we need to know just a bit about files and directories. The information about every file or directory is kept in a data structure called an inode. Data such as file name, access privileges, timestamps, and where the file is located on the media are all stored in the inode. The stat utility displays information about a file. UNIX/Linux supports two kinds of link files a hard link and a symbolic link. A hard link is a file that points to another file s inode. A symbolic link is a reference to another file, not the inode. Links are used for maintaining the appearance of multiple copies of a file without actually storing duplicates of the file. 1. In the /test/temp directory create a new text file named hello.txt and fill it with some random text. cat /dev/urandom tr -dc a-za-z0-9 fold -w 64 head -n 1 > /test/temp/hello.txt 2. Create a link named link hello in the test folder pointing to hello.txt in the temp folder (refer to file hierarchy above): a. cd / b. ln -s /test/temp/hello.txt /test/link hello c. ls -l /test/temp d. cat /test/temp Is there any difference in the file permissions of link hello and hello.txt? a. ls -l /test b. cat /test/link hello What is the output from the cat command? Is the output the same as cat /test/temp or different? 7

8 Exercise 1.4: Default file permissions and Group access control Whenever a new file is created a default set of permissions is assigned to it. Whatever the permissions are, UNIX/Linux systems allow the user to change the permissions set by default. This default setting can be set by the user using the umask command. Some common umask values are 077 (only user has permissions), 022 (only owner can write), 002 (only owner and group members can write), etc. To determine the default file or directory mode from the umask do the following: file: subtract the umask value from 666 to obtain the mode directory: subtract the umask value from 777 to obtain the mode 1. Use the umask command to check the current mask permission and assign a new mask. Execute the umask command. What is the current mask? How is it interpreted? Execute the following commands: a. cd /test b. touch testmask1 c. ls -l What are the permissions of the file testmask1? Execute the following commands: a. umask 0077 b. touch testmask2 c. ls -l What are the permissions of the file testmask2 Reset the umask to the default: a. umask 0022 What does it mean if the umask is set to 0000? The risk of setting the 3 most significant bits (MSB) of the umask will be discussed in the next exercise. What should the umask be to insure that the 3 MSB are unset? 8

9 Exercise 1.5: The setuid bit, setgid bit and sticky bit As explained in the ownership and permission section, the highest three bits (3 MSB) of the permission value of a file represent the setuid bit, setgid bit and the sticky bit. If the setuid bit is set then the uid will always be set to the owner of the file during execution. If the setuid bit is not set then the uid will be the user who executes the process. Similarly, if the setgid bit is set then the gid will be set to the group that owns the file during execution. If the setgid bit is not set then the gid will be the group that executes the process. The original meaning of the sticky bit was to keep processes in main memory when the bit was set. This meaning has been abandoned in nearly all variants of UNIX/Linux and now the sticky bit means that only the owner or root can delete the file regardless of other permissions. When the sticky bit is set, only the owner or root can rename or delete the file regardless of the directory permissions. If the sticky bit is unset, any user with write and execute permissions on the directory can rename or delete file, regardless of the file s owner. In the following exercise, the objective is to demonstrate how processes are affected when the setuid bit is set. Execute the following commands and answer the associated questions: a. which touch b. ls -l /usr/bin/touch c. chmod 4555 /usr/bin/touch d. ls -l /usr/bin/touch e. ls -l /home/user2 f. chmod 700 /home/user2/helloworld g. ls -l /home/user2 (observe timestamp and permissions) h. su - user1 i. touch /home/user2/helloworld j. ls -l /home/user2 (observe timestamp, is it updated?) k. exit l. chmod 0555 /usr/bin/touch m. su - user1 n. touch /home/user2/helloworld (explain why you receive a permission denied error?) o. exit If you do not want to keep the changes you ve made to your VM in this lab, just delete it and re-import the original VM. 9

TEL2821/IS2150: INTRODUCTION TO SECURITY Lab: Operating Systems and Access Control

TEL2821/IS2150: INTRODUCTION TO SECURITY Lab: Operating Systems and Access Control TEL2821/IS2150: INTRODUCTION TO SECURITY Lab: Operating Systems and Access Control Version 1.0, Last Edited 09/20/2005 Name of Students: Date of Experiment: Part I: Objective The objective of the exercises

More information

TEL2821/IS2150: INTRODUCTION TO SECURITY Lab: Operating Systems and Access Control

TEL2821/IS2150: INTRODUCTION TO SECURITY Lab: Operating Systems and Access Control TEL2821/IS2150: INTRODUCTION TO SECURITY Lab: Operating Systems and Access Control Version 2.0, Last Edited 10/1/2006 Students Name: Date of Experiment: Part I: Objective The objective of the exercises

More information

Hands-on Keyboard: Cyber Experiments for Strategists and Policy Makers

Hands-on Keyboard: Cyber Experiments for Strategists and Policy Makers Hands-on Keyboard: Cyber Experiments for Strategists and Policy Makers Review of the Linux File System and Linux Commands 1. Introduction Becoming adept at using the Linux OS requires gaining familiarity

More information

CST8207: GNU/Linux Operating Systems I Lab Six Linux File System Permissions. Linux File System Permissions (modes) - Part 1

CST8207: GNU/Linux Operating Systems I Lab Six Linux File System Permissions. Linux File System Permissions (modes) - Part 1 Student Name: Lab Section: Linux File System Permissions (modes) - Part 1 Due Date - Upload to Blackboard by 8:30am Monday March 12, 2012 Submit the completed lab to Blackboard following the Rules for

More information

Commands are in black

Commands are in black Starting From the Shell Prompt (Terminal) Commands are in black / +--------+---------+-------+---------+---------+------ +------ +------ +------ +------ +------ +-- Bin boot dev etc home media sbin bin

More information

CST Lab 2 Review #1

CST Lab 2 Review #1 CST8177 - Lab 2 Review #1 Student Name Student number Section Objectives To review command line features, file system access, and permissions Lab Outcome A review of working with the command line A review

More information

Lab 2A> ADDING USERS in Linux

Lab 2A> ADDING USERS in Linux Lab 2A> ADDING USERS in Linux Objective In this lab, student will learn how to create user accounts using the Linux operating system. Scenario The XYZ Company has just installed a server running Linux.

More information

Unix Filesystem. January 26 th, 2004 Class Meeting 2

Unix Filesystem. January 26 th, 2004 Class Meeting 2 Unix Filesystem January 26 th, 2004 Class Meeting 2 * Notes adapted by Christian Allgood from previous work by other members of the CS faculty at Virginia Tech Unix Filesystem! The filesystem is your interface

More information

Lab Working with Linux Command Line

Lab Working with Linux Command Line Introduction In this lab, you will use the Linux command line to manage files and folders and perform some basic administrative tasks. Recommended Equipment A computer with a Linux OS, either installed

More information

Working with Basic Linux. Daniel Balagué

Working with Basic Linux. Daniel Balagué Working with Basic Linux Daniel Balagué How Linux Works? Everything in Linux is either a file or a process. A process is an executing program identified with a PID number. It runs in short or long duration

More information

5/8/2012. Encryption-based Protection. Protection based on Access Permission (Contd) File Security, Setting and Using Permissions Chapter 9

5/8/2012. Encryption-based Protection. Protection based on Access Permission (Contd) File Security, Setting and Using Permissions Chapter 9 File Security, Setting and Using Permissions Chapter 9 To show the three protection and security mechanisms that UNIX provides To describe the types of users of a UNIX file To discuss the basic operations

More information

Introduction to the UNIX command line

Introduction to the UNIX command line Introduction to the UNIX command line Steven Abreu Introduction to Computer Science (ICS) Tutorial Jacobs University s.abreu@jacobs-university.de September 19, 2017 Overview What is UNIX? UNIX Shell Commands

More information

Welcome to getting started with Ubuntu Server. This System Administrator Manual. guide to be simple to follow, with step by step instructions

Welcome to getting started with Ubuntu Server. This System Administrator Manual. guide to be simple to follow, with step by step instructions Welcome to getting started with Ubuntu 12.04 Server. This System Administrator Manual guide to be simple to follow, with step by step instructions with screenshots INDEX 1.Installation of Ubuntu 12.04

More information

Filesystem Hierarchy and Permissions

Filesystem Hierarchy and Permissions 2 and Prepared by Steven Gordon on 19 April 2017 Common/Reports/linux-file-permissions.tex, r1417 1 Multiuser and Server Operating System systems are commonly used as a multi-user system E.g. multiple

More information

Filesystem Hierarchy and Permissions

Filesystem Hierarchy and Permissions and Linux Prepared by Steven Gordon on 19 April 2017 Common/Reports/linux-file-permissions.tex, r1417 1/15 Multiuser and Server Operating System Linux systems are commonly used as a multi-user system E.g.

More information

Unix File System. Class Meeting 2. * Notes adapted by Joy Mukherjee from previous work by other members of the CS faculty at Virginia Tech

Unix File System. Class Meeting 2. * Notes adapted by Joy Mukherjee from previous work by other members of the CS faculty at Virginia Tech Unix File System Class Meeting 2 * Notes adapted by Joy Mukherjee from previous work by other members of the CS faculty at Virginia Tech Unix File System The file system is your interface to: physical

More information

Operating systems fundamentals - B10

Operating systems fundamentals - B10 Operating systems fundamentals - B10 David Kendall Northumbria University David Kendall (Northumbria University) Operating systems fundamentals - B10 1 / 12 Introduction Basics of protection and security

More information

Files (review) and Regular Expressions. Todd Kelley CST8207 Todd Kelley 1

Files (review) and Regular Expressions. Todd Kelley CST8207 Todd Kelley 1 Files (review) and Regular Expressions Todd Kelley kelleyt@algonquincollege.com CST8207 Todd Kelley 1 midterms (Feb 11 and April 1) Files and Permissions Regular Expressions 2 Sobel, Chapter 6 160_pathnames.html

More information

Introduction to Linux

Introduction to Linux Introduction to Linux Mukesh Pund Principal Scientist, NISCAIR, New Delhi, India History In 1969, a team of developers developed a new operating system called Unix which was written using C Linus Torvalds,

More information

CSE 390a Lecture 3. Multi-user systems; remote login; editors; users/groups; permissions

CSE 390a Lecture 3. Multi-user systems; remote login; editors; users/groups; permissions CSE 390a Lecture 3 Multi-user systems; remote login; editors; users/groups; permissions slides created by Marty Stepp, modified by Jessica Miller and Ruth Anderson http://www.cs.washington.edu/390a/ 1

More information

INTRODUCTION TO LINUX

INTRODUCTION TO LINUX INTRODUCTION TO LINUX REALLY SHORT HISTORY Before GNU/Linux there were DOS, MAC and UNIX. All systems were proprietary. The GNU project started in the early 80s by Richard Stallman Goal to make a free

More information

Assume that username is cse. The user s home directory will be /home/cse. You may remember what the relative pathname for users home directory is: ~

Assume that username is cse. The user s home directory will be /home/cse. You may remember what the relative pathname for users home directory is: ~ Introduction to Open Source Software Development Spring semester, 2017 School of Computer Science and Engineering, Pusan National University Joon-Seok Kim LINUX: COMMANDS Review Lab #1 2 Create Directories

More information

Operating Systems. Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) alphapeeler.sf.net/pubkeys/pkey.htm

Operating Systems. Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) alphapeeler.sf.net/pubkeys/pkey.htm Operating Systems Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) armahmood786@yahoo.com alphasecure@gmail.com alphapeeler.sf.net/pubkeys/pkey.htm http://alphapeeler.sourceforge.net pk.linkedin.com/in/armahmood

More information

Chapter 8: Security under Linux

Chapter 8: Security under Linux Chapter 8: Security under Linux 8.1 File and Password security Linux security may be divided into two major parts: a) Password security b) File security 8.1.1 Password security To connect to a Linux system

More information

Files and Directories

Files and Directories CSCI 2132: Software Development Files and Directories Norbert Zeh Faculty of Computer Science Dalhousie University Winter 2019 Files and Directories Much of the operation of Unix and programs running on

More information

Operating Systems. Copyleft 2005, Binnur Kurt

Operating Systems. Copyleft 2005, Binnur Kurt 3 Operating Systems Copyleft 2005, Binnur Kurt Content The concept of an operating system. The internal architecture of an operating system. The architecture of the Linux operating system in more detail.

More information

Chapter Two. Lesson A. Objectives. Exploring the UNIX File System and File Security. Understanding Files and Directories

Chapter Two. Lesson A. Objectives. Exploring the UNIX File System and File Security. Understanding Files and Directories Chapter Two Exploring the UNIX File System and File Security Lesson A Understanding Files and Directories 2 Objectives Discuss and explain the UNIX file system Define a UNIX file system partition Use the

More information

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing Content 3 Operating Systems The concept of an operating system. The internal architecture of an operating system. The architecture of the Linux operating system in more detail. How to log into (and out

More information

UNIX File Hierarchy: Structure and Commands

UNIX File Hierarchy: Structure and Commands UNIX File Hierarchy: Structure and Commands The UNIX operating system organizes files into a tree structure with a root named by the character /. An example of the directory tree is shown below. / bin

More information

Unix Introduction to UNIX

Unix Introduction to UNIX Unix Introduction to UNIX Get Started Introduction The UNIX operating system Set of programs that act as a link between the computer and the user. Developed in 1969 by a group of AT&T employees Various

More information

Linux Kung-Fu. James Droste UBNetDef Fall 2016

Linux Kung-Fu. James Droste UBNetDef Fall 2016 Linux Kung-Fu James Droste UBNetDef Fall 2016 $ init 1 GO TO https://apps.ubnetdef.org GO TO https://apps.ubnetdef.org GO TO https://apps.ubnetdef.org GO TO https://apps.ubnetdef.org GO TO https://apps.ubnetdef.org

More information

CSE 303 Lecture 4. users/groups; permissions; intro to shell scripting. read Linux Pocket Guide pp , 25-27, 61-65, , 176

CSE 303 Lecture 4. users/groups; permissions; intro to shell scripting. read Linux Pocket Guide pp , 25-27, 61-65, , 176 CSE 303 Lecture 4 users/groups; permissions; intro to shell scripting read Linux Pocket Guide pp. 19-20, 25-27, 61-65, 118-119, 176 slides created by Marty Stepp http://www.cs.washington.edu/303/ 1 Lecture

More information

Course 144 Supplementary Materials. UNIX Fundamentals

Course 144 Supplementary Materials. UNIX Fundamentals Course 144 Supplementary Materials UNIX Fundamentals 1 Background to UNIX Command Fundamentals This appendix provides a overview of critical commands and concepts Prerequisite knowledge attendees should

More information

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version... Contents Note: pay attention to where you are........................................... 1 Note: Plaintext version................................................... 1 Hello World of the Bash shell 2 Accessing

More information

Outline. Structure of a UNIX command

Outline. Structure of a UNIX command Outline Structure of Unix Commands Command help (man) Log on (terminal vs. graphical) System information (utility) File and directory structure (path) Permission (owner, group, rwx) File and directory

More information

CST8207: GNU/Linux Operating Systems I Lab Seven Linux User and Group Management. Linux User and Group Management

CST8207: GNU/Linux Operating Systems I Lab Seven Linux User and Group Management. Linux User and Group Management Student Name: YOUR NAME Lab Section: 011 012 013 or 014 Linux User and Group Management 1 Due Date - Upload to Blackboard by 8:30am Monday April 2, 2012 Submit the completed lab to Blackboard following

More information

Perl and R Scripting for Biologists

Perl and R Scripting for Biologists Perl and R Scripting for Biologists Lukas Mueller PLBR 4092 Course overview Linux basics (today) Linux advanced (Aure, next week) Why Linux? Free open source operating system based on UNIX specifications

More information

CST8207: GNU/Linux Operating Systems I Lab Seven Linux User and Group Management. Linux User and Group Management

CST8207: GNU/Linux Operating Systems I Lab Seven Linux User and Group Management. Linux User and Group Management Student Name: Lab Section: Linux User and Group Management 1 Due Date - Upload to Blackboard by 8:30am Monday April 2, 2012 Submit the completed lab to Blackboard following the Rules for submitting Online

More information

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University Introduction to Linux Woo-Yeong Jeong (wooyeong@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating system of a computer What is an

More information

CSE 390a Lecture 4. Persistent shell settings; users/groups; permissions

CSE 390a Lecture 4. Persistent shell settings; users/groups; permissions CSE 390a Lecture 4 Persistent shell settings; users/groups; permissions slides created by Marty Stepp, modified by Jessica Miller and Ruth Anderson http://www.cs.washington.edu/390a/ 1 2 Lecture summary

More information

Introduction to Unix May 24, 2008

Introduction to Unix May 24, 2008 Introduction to Unix May 24, 2008 Exercises: Privileges REFERENCE Reference: Shah, Steve, "Linux Administration: A Beginner's Guide", 2nd. ed., Osborne press, New York, NY. If you look at files in a directory

More information

Processes are subjects.

Processes are subjects. Identification and Authentication Access Control Other security related things: Devices, mounting filesystems Search path TCP wrappers Race conditions NOTE: filenames may differ between OS/distributions

More information

Overview LEARN. History of Linux Linux Architecture Linux File System Linux Access Linux Commands File Permission Editors Conclusion and Questions

Overview LEARN. History of Linux Linux Architecture Linux File System Linux Access Linux Commands File Permission Editors Conclusion and Questions Lanka Education and Research Network Linux Architecture, Linux File System, Linux Basic Commands 28 th November 2016 Dilum Samarasinhe () Overview History of Linux Linux Architecture Linux File System

More information

NETW 110 Lab 5 Creating and Assigning Users and Groups Page 1

NETW 110 Lab 5 Creating and Assigning Users and Groups Page 1 NETW 110 Lab 5 Creating and Assigning Users and Groups Page 1 Objective At the conclusion of this lab, the student will be able to add and delete users, create and assign users to groups, and assign users

More information

Practical Session 0 Introduction to Linux

Practical Session 0 Introduction to Linux School of Computer Science and Software Engineering Clayton Campus, Monash University CSE2303 and CSE2304 Semester I, 2001 Practical Session 0 Introduction to Linux Novell accounts. Every Monash student

More information

Overview of the UNIX File System. Navigating and Viewing Directories

Overview of the UNIX File System. Navigating and Viewing Directories Overview of the UNIX File System Navigating and Viewing Directories Copyright 2006 Stewart Weiss The UNIX file system The most distinguishing characteristic of the UNIX file system is the nature of its

More information

h/w m/c Kernel shell Application s/w user

h/w m/c Kernel shell Application s/w user Structure of Unix h/w m/c Kernel shell Application s/w. user While working with unix, several layers of interaction occur b/w the computer h/w & the user. 1. Kernel : It is the first layer which runs on

More information

commandname flags arguments

commandname flags arguments Unix Review, additional Unix commands CS101, Mock Introduction This handout/lecture reviews some basic UNIX commands that you should know how to use. A more detailed description of this and other commands

More information

Due: February 26, 2014, 7.30 PM

Due: February 26, 2014, 7.30 PM Jackson State University Department of Computer Science CSC 438-01/539-01 Systems and Software Security, Spring 2014 Instructor: Dr. Natarajan Meghanathan Project 1: Exploring UNIX Access Control in a

More information

CSE 390a Lecture 4. Persistent shell settings; users/groups; permissions

CSE 390a Lecture 4. Persistent shell settings; users/groups; permissions CSE 390a Lecture 4 Persistent shell settings; users/groups; permissions slides created by Marty Stepp, modified by Jessica Miller and Ruth Anderson http://www.cs.washington.edu/390a/ 1 2 Lecture summary

More information

Processes are subjects.

Processes are subjects. Identification and Authentication Access Control Other security related things: Devices, mounting filesystems Search path Race conditions NOTE: filenames may differ between OS/distributions Principals

More information

Lab Authentication, Authorization, and Accounting

Lab Authentication, Authorization, and Accounting Objectives Given a scenario, select the appropriate authentication, authorization, or access control Install and configure security controls when performing account management, based on best practices

More information

Linux Systems Administration Getting Started with Linux

Linux Systems Administration Getting Started with Linux Linux Systems Administration Getting Started with Linux Network Startup Resource Center www.nsrc.org These materials are licensed under the Creative Commons Attribution-NonCommercial 4.0 International

More information

Linux/Cygwin Practice Computer Architecture

Linux/Cygwin Practice Computer Architecture Linux/Cygwin Practice 2010 Computer Architecture Linux Login Use ssh client applications to connect (Port : 22) SSH Clients zterm ( http://www.brainz.co.kr/products/products4_2.php ) Putty ( http://kldp.net/frs/download.php/3411/hangulputty-0.58.h2.exe

More information

CSCI 2132 Software Development. Lecture 5: File Permissions

CSCI 2132 Software Development. Lecture 5: File Permissions CSCI 2132 Software Development Lecture 5: File Permissions Instructor: Vlado Keselj Faculty of Computer Science Dalhousie University 14-Sep-2018 (5) CSCI 2132 1 Files and Directories Pathnames Previous

More information

The kernel is the low-level software that manages hardware, multitasks programs, etc.

The kernel is the low-level software that manages hardware, multitasks programs, etc. November 2011 1 Why Use Linux? Save Money Initial purchase and maintenance Resume Linux is used by MANY organizations More choices Tons of Linux operating systems November 2011 2 What is Linux? 1. Contains

More information

Overview of the UNIX File System

Overview of the UNIX File System Overview of the UNIX File System Navigating and Viewing Directories Adapted from Practical Unix and Programming Hunter College Copyright 2006 Stewart Weiss The UNIX file system The most distinguishing

More information

Introduction to Linux

Introduction to Linux Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA - Dong-Yun Lee (dylee@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating

More information

bash startup files Linux/Unix files stty Todd Kelley CST8207 Todd Kelley 1

bash startup files Linux/Unix files stty Todd Kelley CST8207 Todd Kelley 1 bash startup files Linux/Unix files stty Todd Kelley kelleyt@algonquincollege.com CST8207 Todd Kelley 1 midterms (Feb 27 and April 10) bash startup files More Linux Files review stty 2 We customize our

More information

Chapter-3. Introduction to Unix: Fundamental Commands

Chapter-3. Introduction to Unix: Fundamental Commands Chapter-3 Introduction to Unix: Fundamental Commands What You Will Learn The fundamental commands of the Unix operating system. Everything told for Unix here is applicable to the Linux operating system

More information

FILESYSTEMS. Mmmm crunchy

FILESYSTEMS. Mmmm crunchy FILESYSTEMS Mmmm crunchy PURPOSE So all this data... How to organize? Whose job? Filesystems! PERMISSIONS Linux supports 3 main types of access on a file: read: View the contents write: Modify the contents

More information

Capability and System Hardening

Capability and System Hardening P a g e 1 Date Assigned: mm/dd/yyyy Date Due: mm/dd/yyyy by hh:mm Educational Objectives Capability and System Hardening This lab is designed to help you gain a better understanding of system hardening

More information

Session 1: Accessing MUGrid and Command Line Basics

Session 1: Accessing MUGrid and Command Line Basics Session 1: Accessing MUGrid and Command Line Basics Craig A. Struble, Ph.D. July 14, 2010 1 Introduction The Marquette University Grid (MUGrid) is a collection of dedicated and opportunistic resources

More information

INF322 Operating Systems

INF322 Operating Systems Galatasaray University Computer Engineering Department INF322 Operating Systems TP01: Introduction to Linux Ozan Çağlayan ocaglayan@gsu.edu.tr ozancaglayan.com Fundamental Concepts Definition of Operating

More information

1 Installation (briefly)

1 Installation (briefly) Jumpstart Linux Bo Waggoner Updated: 2014-09-15 Abstract A basic, rapid tutorial on Linux and its command line for the absolute beginner. Prerequisites: a computer on which to install, a DVD and/or USB

More information

CSCI 2132 Software Development. Lecture 4: Files and Directories

CSCI 2132 Software Development. Lecture 4: Files and Directories CSCI 2132 Software Development Lecture 4: Files and Directories Instructor: Vlado Keselj Faculty of Computer Science Dalhousie University 12-Sep-2018 (4) CSCI 2132 1 Previous Lecture Some hardware concepts

More information

A Big Step. Shell Scripts, I/O Redirection, Ownership and Permission Concepts, and Binary Numbers

A Big Step. Shell Scripts, I/O Redirection, Ownership and Permission Concepts, and Binary Numbers A Big Step Shell Scripts, I/O Redirection, Ownership and Permission Concepts, and Binary Numbers Copyright 2006 2009 Stewart Weiss What a shell really does Here is the scoop on shells. A shell is a program

More information

LAB #7 Linux Tutorial

LAB #7 Linux Tutorial Gathering information: LAB #7 Linux Tutorial Find the password file on a Linux box Scenario You have access to a Linux computer. You must find the password file on the computer. Objective Get a listing

More information

PESIT Bangalore South Campus

PESIT Bangalore South Campus INTERNAL ASSESSMENT TEST - 2 Date : 20/09/2016 Max Marks : 0 Subject & Code : Unix Shell Programming (15CS36) Section : 3 rd Sem ISE/CSE Name of faculty : Prof Ajoy Time : 11:30am to 1:00pm SOLUTIONS 1

More information

Exercise Sheet 2. (Classifications of Operating Systems)

Exercise Sheet 2. (Classifications of Operating Systems) Exercise Sheet 2 Exercise 1 (Classifications of Operating Systems) 1. At any given moment, only a single program can be executed. What is the technical term for this operation mode? 2. What are half multi-user

More information

Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2

Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2 Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades 2017-2018 Q2 Facultat d Informàtica de Barcelona This first lab session is focused on getting experience in working

More information

Introduction to Linux

Introduction to Linux Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA - Kisik Jeong (kisik@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating

More information

This lab exercise is to be submitted at the end of the lab session! passwd [That is the command to change your current password to a new one]

This lab exercise is to be submitted at the end of the lab session! passwd [That is the command to change your current password to a new one] Data and Computer Security (CMPD414) Lab II Topics: secure login, moving into HOME-directory, navigation on Unix, basic commands for vi, Message Digest This lab exercise is to be submitted at the end of

More information

CS Fundamentals of Programming II Fall Very Basic UNIX

CS Fundamentals of Programming II Fall Very Basic UNIX CS 215 - Fundamentals of Programming II Fall 2012 - Very Basic UNIX This handout very briefly describes how to use Unix and how to use the Linux server and client machines in the CS (Project) Lab (KC-265)

More information

CENG 334 Computer Networks. Laboratory I Linux Tutorial

CENG 334 Computer Networks. Laboratory I Linux Tutorial CENG 334 Computer Networks Laboratory I Linux Tutorial Contents 1. Logging In and Starting Session 2. Using Commands 1. Basic Commands 2. Working With Files and Directories 3. Permission Bits 3. Introduction

More information

Linux Essentials. Programming and Data Structures Lab M Tech CS First Year, First Semester

Linux Essentials. Programming and Data Structures Lab M Tech CS First Year, First Semester Linux Essentials Programming and Data Structures Lab M Tech CS First Year, First Semester Adapted from PDS Lab 2014 and 2015 Login, Logout, Password $ ssh mtc16xx@192.168.---.--- $ ssh X mtc16xx@192.168.---.---

More information

: the User (owner) for this file (your cruzid, when you do it) Position: directory flag. read Group.

: the User (owner) for this file (your cruzid, when you do it) Position: directory flag. read Group. CMPS 12L Introduction to Programming Lab Assignment 2 We have three goals in this assignment: to learn about file permissions in Unix, to get a basic introduction to the Andrew File System and it s directory

More information

Operating Systems Lab 1 (Users, Groups, and Security)

Operating Systems Lab 1 (Users, Groups, and Security) Operating Systems Lab 1 (Users, Groups, and Security) Overview This chapter covers the most common commands related to users, groups, and security. It will also discuss topics like account creation/deletion,

More information

5/8/2012. Creating and Changing Directories Chapter 7

5/8/2012. Creating and Changing Directories Chapter 7 Creating and Changing Directories Chapter 7 Types of files File systems concepts Using directories to create order. Managing files in directories. Using pathnames to manage files in directories. Managing

More information

Intro to Linux. this will open up a new terminal window for you is super convenient on the computers in the lab

Intro to Linux. this will open up a new terminal window for you is super convenient on the computers in the lab Basic Terminal Intro to Linux ssh short for s ecure sh ell usage: ssh [host]@[computer].[otheripstuff] for lab computers: ssh [CSID]@[comp].cs.utexas.edu can get a list of active computers from the UTCS

More information

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University Unix/Linux Basics 1 Some basics to remember Everything is case sensitive Eg., you can have two different files of the same name but different case in the same folder Console-driven (same as terminal )

More information

Operating Systems Lab

Operating Systems Lab Operating Systems Lab Islamic University Gaza Engineering Faculty Department of Computer Engineering Fall 2012 ECOM 4010: Operating Systems Lab Eng: Ahmed M. Ayash Lab # 4 Paths, Links & File Permissions

More information

Exercise 4: Access Control and Filesystem Security

Exercise 4: Access Control and Filesystem Security Exercise 4: Access Control and Filesystem Security Introduction Duration: 90 min Maximum Points: 30 Note: The solutions of theorethical assignments should be handed out before the practical part in the

More information

1. Open VirtualBox and start your linux VM. Boot the machine and log in with the user account you created in Lab #1. Open the Terminal application.

1. Open VirtualBox and start your linux VM. Boot the machine and log in with the user account you created in Lab #1. Open the Terminal application. CIT 210L Name: Lab #2 1. Open VirtualBox and start your linux VM. Boot the machine and log in with the user account you created in Lab #1. Open the Terminal application. 2. Listing installed packages -

More information

Basic Survival UNIX.

Basic Survival UNIX. Basic Survival UNIX Many Unix based operating systems make available a Graphical User Interface for the sake of providing an easy way for less experienced users to work with the system. Some examples are

More information

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX This handout very briefly describes how to use Unix and how to use the Linux server and client machines in the EECS labs that dual boot

More information

CS4350 Unix Programming. Outline

CS4350 Unix Programming. Outline Outline Unix Management Files and file systems Structure of Unix Commands Command help (man) Log on (terminal vs. graphical) System information (utility) File and directory structure (path) Permission

More information

User & Group Administration

User & Group Administration User & Group Administration David Morgan Users useradd/userdel /home/ /etc/passwd is the user database /etc/shadow has passwords (relocated from passwd) /etc/group whoami su / sudo / SUID process

More information

User accounts and authorization

User accounts and authorization User accounts and authorization Authentication vs authorization Authentication: proving the identity of someone Authorization: allowing a user to access certain resources 1 Government authorization documents

More information

Exploring UNIX: Session 3

Exploring UNIX: Session 3 Exploring UNIX: Session 3 UNIX file system permissions UNIX is a multi user operating system. This means several users can be logged in simultaneously. For obvious reasons UNIX makes sure users cannot

More information

Essential Unix and Linux! Perl for Bioinformatics, ! F. Pineda

Essential Unix and Linux! Perl for Bioinformatics, ! F. Pineda Essential Unix and Linux! Perl for Bioinformatics, 140.636! F. Pineda Generic computer architecture Memory Storage Fig. 1.2 From Designing Embedded Hardware, 2 nd Ed. by John Catsoulis OS concepts Shell

More information

UNIT 10 Ubuntu Security

UNIT 10 Ubuntu Security AIR FORCE ASSOCIATION S CYBERPATRIOT NATIONAL YOUTH CYBER EDUCATION PROGRAM UNIT 10 Ubuntu Security Learning Objectives Participants will understand how to configure major components of Linux/Ubuntu Account

More information

Presented by Bill Genske Gary Jackson

Presented by Bill Genske Gary Jackson Quintessential School Systems Session C Linux Presented by Bill Genske Gary Jackson Copyright Quintessential School Systems, 2009 All Rights Reserved 867 American Street --- Second Floor --- San Carlos,

More information

Lec 1 add-on: Linux Intro

Lec 1 add-on: Linux Intro Lec 1 add-on: Linux Intro Readings: - Unix Power Tools, Powers et al., O Reilly - Linux in a Nutshell, Siever et al., O Reilly Summary: - Linux File System - Users and Groups - Shell - Text Editors - Misc

More information

CSE 303 Lecture 2. Introduction to bash shell. read Linux Pocket Guide pp , 58-59, 60, 65-70, 71-72, 77-80

CSE 303 Lecture 2. Introduction to bash shell. read Linux Pocket Guide pp , 58-59, 60, 65-70, 71-72, 77-80 CSE 303 Lecture 2 Introduction to bash shell read Linux Pocket Guide pp. 37-46, 58-59, 60, 65-70, 71-72, 77-80 slides created by Marty Stepp http://www.cs.washington.edu/303/ 1 Unix file system structure

More information

A Brief Introduction to the Command Line. Hautahi Kingi

A Brief Introduction to the Command Line. Hautahi Kingi A Brief Introduction to the Command Line Hautahi Kingi Introduction A shell is a computer program like any other. But its primary purpose is to read commands and run other programs, rather than to perform

More information

Using the aregcmd Commands

Using the aregcmd Commands CHAPTER 2 This chapter describes how to use each of the aregcmd commands. The Cisco Access Registrar aregcmd command is a command-line based configuration tool. It allows you to set any Cisco Access Registrar

More information

Mills HPC Tutorial Series. Linux Basics I

Mills HPC Tutorial Series. Linux Basics I Mills HPC Tutorial Series Linux Basics I Objectives Command Line Window Anatomy Command Structure Command Examples Help Files and Directories Permissions Wildcards and Home (~) Redirection and Pipe Create

More information

CSI 402 Lecture 11 (Unix Discussion on Files continued) 11 1 / 19

CSI 402 Lecture 11 (Unix Discussion on Files continued) 11 1 / 19 CSI 402 Lecture 11 (Unix Discussion on Files continued) 11 1 / 19 User and Group IDs Ref: Chapter 3 of [HGS]. Each user is given an ID (integer) called uid. (Most system programs use uid instead of the

More information

Scripting. Shell Scripts, I/O Redirection, Ownership and Permission Concepts, and Binary Numbers

Scripting. Shell Scripts, I/O Redirection, Ownership and Permission Concepts, and Binary Numbers Scripting Shell Scripts, I/O Redirection, Ownership and Permission Concepts, and Binary Numbers Adapted from Practical Unix and Programming Hunter College Copyright 2006 2009 Stewart Weiss What a shell

More information