Forum OpenACS Q&A: Q1 - experiment Response to Newbee documentation
Posted by
Aernout Schmidt
on 09/04/02 12:23 AM
If you have the server running FreeBSD-4.6.2, if you can access it through PuTTY and you are new to unix/FreeBSD the next series of experiments should provide enough FreeBSD fluency to help you through much of the steps ahead. Memorizing the basic system directory structure and its semantics (from the handbook) is useful.
1. Activate (as root user - in code listings denoted by the # prompt) the typescript log of your actions:
# script
2. Make (as root user) a new directory
# mkdir -p /usr/experiment/test
Check # man mkdir
for the meaning of the -p option. As a matter of fact: check the man pages every time a command is suggested in the text and you do not know the meaning of it or its options and parameters.
3. Check your location in the file system (current directory):
# pwd
4. Change to the /usr/experiment/test directory:
# cd /usr/experiment/test
5. Edit the file blurb in that directory (it will be a new file):
# edit blurb
6. Create and save the textfile, experimenting with the on screen help.
7. Create a symbolic link from /usr/experiment/test/blurb to /blurb:
# ln -s /usr/experiment/test/blurb /blurb
8. Look at the characteristics of the files and directories in the file system root:
# ls -l /
9. Edit /blurb and notice its contents are and remain actually /usr/experiment/test/blurb's contents.
10. Print the contents of /blurb to your screen:
# cat /blurb
11. Make the new user "anotheruser" and give her a password:
# pw useradd -G wheel -d /home -n anotheruser
# passwd anotheruser
12. Make "anotheruser" owner of /blurb
# chown -R anotheruser /blurb
13. Look again at the characteristics of the files and directories in the file system root:
# ls -l /
14. Become "anotheruser" and force the "anotheruser" enviromment to become active:
# su - anotheruser
15. Look again at the characteristics of the files and directories in the file system root and note the differences. Note that anotheruser's prompt is $:
$ ls -l /
16. Check your current directory (the - option of the su command forces the new user's home directory):
$ pwd
17. Become the root user again:
$ exit
18. Stop logging your actions (Ctrl-c interrupts the active logging process started from the PuTTY console earlier):
# Ctrl-c
19. Find the location of the file "typescript" (containing your log) - start searching in the file system root - print the result on your console:
# find / -name "typescript" -print
20. Copy the relevant typescript file to the home directory (found in step 16) of "anotheruser"
# cp "founddiretory"/typescript "anotheruserhomedirectory"/.
21. Start iXPLORER on your windows box - (it behaves peculiar on my W2000 environment: after starting it I get a black screen. Only after selecting and leaving the "task list" option after ctrl-alt-del, the interface becomes visible).
22. Connect to your server as "anotheruser".
23. Transfer the file "blurb" from the home directory on your server to a location on your windows box.
24. Print the file from your windows box. (The last steps are most useful if your windows box is located distant from your server).
25. Go back to your PuTTy window, clean up the mess you made and leave PuTTY:
# cd /usr
# rm -R experiment
# cd /
# rm blurb
# pw userdel anotheruser
# exit
# exit
26. If you need to restart your server from a distance (using PuTTY) use the reboot command (it will not attempt to shut down the power):
# reboot
27. Try out the power shutdown:
# shutdown -p +01:00