Log in to pe15
- Run the ssh client
Use the values in the table below to connect to pe15.
ssh configuration parameter value protocol ssh ssh version 2 ssh port 22 host pe15.cs.umb.edu user name your Unix username Authentication method password
- Enter your password
A dialog box will appear on the screen into which you must type the password for your Unix account.
Directory for this Exercise
(When you are ready for me to check this exercise, please scroll back up to where you entered these commands!)
- Go to your ex directory
cd ~/it244/ex- Create an ex10 directory
mkdir ex10- Go to your ex10 directory
cd ex10Create a typescript File
- Make sure you are in your ex10 directory
pwdIf the result of running this command is not~YOUR_UNIX_USERNAME/it244/ex/ex10where YOUR_UNIX_USERNAME is the name you created for your Unix account, see me.- Run the script command
script --flushThis will create a typescript file in your ex10 directory.
You must perform the remaining steps in this exercise while script is still running.
If you make a mistake, simply try again.
Do not exit the script session until you have finished all the steps in this exercise.Setuid
- Find the absolute path of the passwd program
which passwd- Look at the permissions on this file
ls -l /usr/bin/passwdNotice that the execute column for user (owner) has an s in the execute column and that the owner is root.
- Look at the permissions oof he file that contains the encrypted passwords
ls -l /etc/shadowNotice that no one can read this file -- only the owner, root, can read it.
But since the passwd command has setuid enabled, anyone who runs this command has the access permissions that root has.Directory Permissions
- Go to the dir_permissions directory in my course_files/it244_files directory
cd ~ckelly/course_files/it244_files/dir_permissions- Make sure you are in the right directory
pwd- Look at the permissions of the contents of this directory
ls -l- Look at the contents of dir1 and their permissions
ls -l dir1You have read permission for this directory, so you can run ls on it.
- Enter dir1
cd dir1You have execute permission so you can enter the directory.
- Make sure you are in the right directory
pwd- Create a file whose name is your user name in this directory
touch YOUR_UNIX_ID- Perform a long listing of the contents of dir1
ls -lSince you have write permissions to this directory, you can create a file in it. Notice that you are the owner of this newly created file.
- Return to the dir_permissions directory
cd ..- Make sure you are in the right directory
pwd- Look at the permissions on dir2
ls -ld dir2Running ls -l on dir2 gives you a long listing of the contents of dir2.
If you want to see the permissions on the directory itself, you must use the -d option.
- Look at the contents of the dir2 directory and their permissions
ls -l dir2You have read permission, so you can do this.
- Enter dir2
cd dir2You can enter this directory because you have execute permission on it.
- Make sure you are in the right directory
pwd- Try to create a file in this directory.
touch YOUR_UNIX_IDThis command fails because you do not have write permission for this directory.
- Return to the dir_permissions directory
cd ..- Make sure you are in the right directory
pwd- Look at the permissions on dir3
ls -ld dir3- Try to list the contents of dir3
ls dir3You can do this because you have read permission on dir3.
- Try to cd into this directory
cd dir3This command fails because you do not have execute permission on dir3.
- Try to create a file in dir3
touch dir3/YOUR_UNIX_IDThis command fails because you do not have write permission on dir3.
- Look at the permissions on dir4
ls -ld dir4- Try to list the contents of dir4
ls dir4This command fails because you do not have read permission on dir4.
- Enter dir4
cd dir4This command succeeds because you have execute permission on dir4.
- Confirm that you are in dir4
pwd- Try to list the contents of dir4 now that you are inside the directory.
lsAgain the command fails because you do not have read permission.
- Try to create a file in this directory.
touch YOUR_UNIX_IDThis command fails because you do not have write permission for this directory.
Links
- Return to your home directory
cd ~- Confirm that you are in your home directory
pwd- Create a link to the ex10
ln -s it244/ex/ex10 ex10- List the contents of your home directory along with permissions
ls -lNotice that you have at least two links in your home directory, the it244 link that was created when you applied successfully for this course, and the one you just created.
Notice that the it244 link uses an absolute pathname while the one you just created uses a relative pathname.
Notice that the link you just created references another link, it244.
- Enter your ex10 directory using this new link
cd ex10- Display your current location
pwd- Now show your true location
pwd -PWhat you think of as your it244 directory is really a link to a directory, named after you Unix ID, in the /courses/it244/f16/ckelly/ directory.
- Return to your parent directory
cd ..- Show your location
pwdNotice that you jumped back to your it244 directory, ignoring the fact that your ex10 directory was inside your ex driectory.
- Tell me when you are finished
There is no shell script for this exercise, but I need to check that you have created the correct link.End your script Session
- Exit from your script session
exitYou need to do this or the typescript file will never be created- Look at the contents of the typescript file
cat typescript