Q1. updates for Set-UID project There is a modification for the Set-UID project PDF file. It is in Task 6 (b). We add a "," on the second gcc command. Please use the latest version via link http://www.cis.syr.edu/~wedu/Teaching/cis643/Labs/Set-UID/Set-UID.pdf The following is some information for the students who is not very familiar with Linux. 1. When you are in the X-window of Ubuntu, you need to run the "terminal" program to do the project. You can type the commands in the opened terminal. 2. Use "whoami" to check what is the current user, root or normal user. 3. Use "echo $0" to check the current shell that you are using. Note that when "root" is running "echo $0", it will return "-su"; when a normal user runs "echo $0", it will return the name of the shell. 4. the manual page for setuid() system call can be found in http://linux.die.net/man/3/setuid For other manual pages for system call like getuid(), you can use "getuid manual page" in your favorite search engine. 5. A vi tutorial can be found here: https://engineering.purdue.edu/ECN/Support/KB/Docs/ViTextEditorTutorial Q2. how to find the directory of a command? If you don't know where the "passwd" command is, please run the following: which passwd Q3. linux command reference In case you are not familiar with the linux commands, please refer to http://www.pixelbeat.org/cmdline.html Q4. How to use gcc to compile c program? The full manual page can be found in http://gcc.gnu.org/onlinedocs/gcc-4.4.1/gcc/ Simply, if we are only compiling a single program, we can use # gcc mycode.c The above command will generate a "a.out" file as the executable binary. You can run the executable by using the following command: # ./a.out Note that, you need to use the current directory information "./" in front of "a.out". Otherwise, the system may be search the current directory for you, unless you have specific it in the PATH environment variable. If you want to give the filename for the generated executable binary, you can use # gcc mycode.c -o myname Q5. X Server error when booting the system, after I link /bin/sh to /bin/zsh If you are having the X server error problem when you start the ubuntu, follow the steps to recover: 1. login as root in the command prompt, password of root is provided in the manual.pdf 2. execute the following commands (as root user, # is the prompt for root user, do not enter the "#") # mount -o remount / # cd /bin # rm sh # ln -s bash sh # reboot 3. done. The reason why the X server error problem happens is that something wrong when /bin/sh is linked to /bin/zsh. Therefore, we need to make /bin/sh link to /bin/bash. However, if we login as a root at that time, we only have a read-only file system. We need to remount the whole file system to be able to write. The remaining three steps is just to build the symbolic link. 4. If you want to avoid the problem, each time before you shutdown or reboot the system, make sure that /bin/sh is linked to /bin/bash. Run the following command to see what /bin/sh is linked to $ ls -la /bin/sh Q6. 10 seconds session error: your session lasted less than 10 seconds. if you have not logged out, this could mean that there is some installation problem or that you may be out of diskspace. try logging in with one of the failsafe session to see if you can fix this problem. link: http://pcinfo.thepebkac.net/2009/06/18/linux_error_session_10_seconds.aspx?ref=rss run as root # chmod 1777 /tmp