In CSE 131 you are encouraged to work in teams of 2. If you do that, how can you work on the same files, without sharing passwords and actually
logging into the same account?
A good way to solve the problem is with UNIX groups. You and your partner
(and no one else)
can become members of the same UNIX group. Then, directories
and files you are working on can be made readable and writable to that group,
so that only you and your partner can read and modify them. (The files will
reside under the home directory of one of you or your partner... but you
don't need to log into each other's accounts or share passwords.)
To take advantage of this, do the following.
From one of your accounts, after prepping into the cs131s environment
run the command
and enter your login names.
ACS will then create a unique group containing just the 2 logins you requested.
(Unfortunately this may take a few days.) You can tell when your group has
been set up: run the command
This will show the groups you are
in. The new ACS-created group will appear as something like cs131s_#.
When you see that, you are ready to proceed.
In one of your accounts, say joeuser,
create a directory you want to use as your
shared working directory, say Project1:
Make sure this directory has its group sticky bit set:
ls -ld Project1
You should see something like:
drwxrws--- 2 joeuser cs131s 4096 Jan 3 22:13 Project1
That s at the end of drwxrws--- is the group sticky bit.
Now make that directory's group ID and the top level directory be the new group you and your partner are in by
running the chgrp command:
chgrp cs131s_# .
chgrp cs131s_# Project1
Do a ls -ld again to make sure the group ID has changed:
ls -ld . Project1
drwxrws--- 2 joeuser cs131s_# 4096 Jan 3 22:13 .
drwxrws--- 2 joeuser cs131s_# 4096 Jan 3 22:13 Project1
You have to do one more thing: set the world 'x' bit on your home directory
(the one containing the Project1 directory):
chmod o+x .
Now you can copy the contents of the public/starterCode/ to your shared Project1
directory. Assuming you are still logged in as joeuser, something like
cp ~/../public/starterCode/* ~/Project1/
Now either of you in the group can cd to that Project1 directory,
create, read, and write files and directories, etc. To make it
even more convenient, the other member of your group can create
a symbolic link to the shared project directory under their own home directory. When
logged into the other/partner account, do:
ln -s /home/solaris/ieng9/cs131s/joeuser/Project1 .