CS 302, Spring 2005 Assignment #2: 10 Points. Due Date: Tuesday, 2/15/05. Read Chapter 3 of Frisch. (3) 1. Login to your ASSERT lab account and use VMware to boot the RHEL3_basic virtual machine which was partially configured for HW#1. Set up one user account having your last name as the login and another account with login 'user1'. Fill in the GECOS information and assign passwords to both accounts. Configure the user1 login to be a member of the 'user' group (gid=100). and add your login to the 'root' group. List out the entries for the new logins from /etc/passwd, /etc/shadow and /etc/group. Logout from root and login to each of the new user accounts and verify that you can open a terminal window from each.** (2) 2. Login using your last name login and become a root user by running the 'su' command. To limit access to the 'su' command, modify the file permissions on /bin/su to allow only those logins which are members of the 'root' group to run su. Show the resulting permissions and test your last name account and the user1 account to verify that your login can run 'su', but user1 cannot.** (4) 3. What effect does setting the suid and sgid permissions have on a directory? Demonstrate how this can be used to provide shared access by the members of a group to the files in a directory by creating a CS302 login and group which allows access to the files in the CS302 home directory by all members of the CS302 group. Set group rwx and sgid permissions on the CS302 directory, add the user1 login to the CS302 group, and verify that files may be created, modified and deleted in the CS302 directory from both the CS302 login and the user1 login. Provide full listings of the file permissions created in the CS302 directory as well as the permissions and ownership for the directory. Also verify that your own login does NOT have access to the files in the CS302 directory. How can the 'umask' command be used to make shared directory access work more easily?** (1) 4. Change the file permissions on /etc/passwd to allow only the root user to read /etc/passwd. Login as yourself (not root). List the files in your home directory using 'ls -al'. What differences do you see in the file listing when access to the passwd file is restricted? Explain why this happens.** **Output from Linux commands and programs should be saved to a file using either I/O redirection (>) or the 'script' command, printed and handed in along with your answers to the questions.