 |
IATH Helpdesk Help
|
INTRODUCTION
This document is for the IATH helpdesk staff and is intended to help
solve common problems. Please feel free to send in corrections and amendments
as necessary. Some of this information is also in the guidelines for new fellows, but some is just here for staff use.
1. Heading off problems before they happen
The guidelines for new fellows (currently a draft), is on-line at
http://jefferson.village.virginia.edu/~spw4s/new_fellows.html,
and we should encourage fellows to use this document when possible. Ideally, it
will answer basic questions and promote good practices. If you have not looked
at it, PLEASE DO.
One topic that hasn't yet made it into the new fellows guidelines
is a standard IATH toolkit. There is, however, a draft of a list, below:
| Category |
PC |
Mac |
Unix |
Forbidden |
| Word processing
|
Word
|
Word
|
Star Office
|
|
| Text editor
|
Notetab
|
BBEdit
|
emacs, pico
|
Jove
|
| Image processing
|
Photoshop, Fireworks
|
Photoshop, Fireworks
|
ImageMagik
|
XV
|
| Image generation 1
|
Illustrator, visio, Photoshop, Freehand, Fireworks
|
Illustrator, Omnigraph, Photoshop, Freehand,
Fireworks
|
n/a
|
|
| Screen grabs
|
Snag-it
|
(built-in)
|
(print screen key)
|
|
| HTML tagging
|
Dreamweaver, XMetaL, Notetab 2
|
Dreamweaver, BBEdit
|
emacs 2
|
Word
|
| SGML/XML tagging
|
Epic, XMetaL, Notetab 2
|
emacs (in OS X) 2
|
emacs 2
|
Epic
|
| XSL stylesheets
|
Notetab 2
|
BBEdit 2
|
emacs (in OS X) 2
|
|
| SGML/XML validators
|
elcel
|
SP Suite
|
SP Suite
|
|
| E-mail
|
Mulberry, Eudora, Bat
|
Mulberry, Eudora
|
pine, elm
|
Outlook
|
2. Unix commands
Note that Unix commands can vary from one platform to another and
that the syntax in this document is for jefferson's particular configuration.
Note also that some of these require that you be logged in as root.
Please be sure that you log out again when you are
finished!
-
2.1. Other Unix information
-
Basic Unix information is available on the web in several
guises, such as UNIXHelp (
http://www.geek-girl.com/Unixhelp/), Webmonkey (
http://hotwired.lycos.com/webmonkey/reference/unix_guide/)
and in Unix man pages. To see a man page, enter the command “man”
plus the command name. E.g.,
$ man cp
And, we have Unix books in the IATH library.
-
You can often get information with a -help or --help flag. The output will vary from one command to another, since it depends
on what kind of documentation the individual programmer provided. You may get no more than an brief line of syntax or a longer
explanation of the command's options and some helpful usage suggestions. For example:
$ rm --help
Usage: rm [OPTION]... FILE...
Remove (unlink) the FILE(s).
-d, --directory unlink directory, even if non-empty
(super-user only)
-f, --force ignore nonexistent files, never prompt
-i, --interactive prompt before any removal
-r, -R, --recursive remove the contents of directories
recursively
-v, --verbose explain what is being done
--help display this help and exit
--version output version information and exit
To remove a file whose name starts with a `-', for example `-foo',
use one of these commands:
rm -- -foo
rm ./-foo
Note that if you use rm to remove a file, it is usually possible to
recover the contents of that file. If you want more assurance that
the contents are truly unrecoverable, consider using shred.
Report bugs to <bug-fileutils@gnu.org>.
-
2.2. Syntax conventions
-
There are certain conventions used when documenting command
syntax that are used in this section. Anything between [ ] is optional and
anything between { } is required. When a series of arguments are separated by
the “|” character it means that you can use only one of the
arguments. Generic titles such as "number" or "file name" are put between <> brackets. For example:
$ command [-xy] {-z | -a} <file name>
-
This means that the –x and -y arguments are optional (you
can use one, both, or neither) but you must use either –z or -a (but not
both) when running the command. You must also include the file name (but not
the actual string “file name”).
-
2.3. Terminology
-
This section contains a few technical definitions that you
should know. There are other terms, of course, that you will run across so we
suggest that you find and use some of the technical and computer dictionaries
on-line, such as FOLDOC (http://foldoc.doc.ic.ac.uk/foldoc/index.html).
-
- argument: Supplemental information provided on the command line
when running a program. Arguments can specify how a command should behave;
where it should find its input and put output; when, where, and how long it
should run; etc. Unix commands often have a bewildering array of possible
arguments, and your options can vary depending on which platform you are working
on. Jefferson is a solaris platform.
- execute: Start a program. An executable file is a file that
contains code for running a program.
- input: Data fed into a program when it is run.
- output: The results of running a program. Sometimes the output is
sent directly to a file, sometimes it appears on the command line.
- path name: The path name is the location of a file or directory in the hierarchical Unix file system. Note that there is a difference
between an absolute path name and a relative path name. An absolute path name is the full path, from the root / directory
to the current directory (also called the working directory). Examples would be /institute/web/mss/index.html or /home/spw4s/bar.txt.
A relative path name is the path name from the working directory forward (e.g., mss/index.html if the working directory is
/institute/web or bar.txt if the working directory is /home/spw4s).
- process: A copy of a program which is currently running. Note that
while there may be only one copy of a program (i.e., one file that contains the
code to run the program), you can usually run multiple processes from a single
program at the same time.
- regular expression: Used for pattern matching when looking for particular
pieces of text. A regular expression is a pattern, made up of alphanumeric
characters (such as “foo123”) and special characters that further
describe the pattern, such as all words that begin with the letter K or
everything that falls between "BEGIN" and "END." You might use a regular
expression to find and replace an outdated tag or to identify files that
contain someone's name. Steve Ramsey wrote a useful
explanation of regular
expressions on the E-Text web site.
- script: A program written in a programming language (such as Perl
or C++). A script can be a text file that is run several times or a line of
code on the command line that is executed only once.
- server: A computer that holds files, runs programs, and/or
performs other services for other computers that are connnected to it by a
network.
- shell: A shell (also called a wrapper) is the interface for the
user to the operating system. It passes instructions from your command line to
the operating system or server. When you enter commands on your command line
you are working in a shell. The shell contains your environment settings, which
tell the operating system who you are, what printer you use, where your home
directory is, etc.
- text file: A file that contains only text (rather than binary code).
Perl scripts, HTML files, and *.txt files are all text files. Binary files,
such as *.doc files, GIF files, and MP3 files, contain binary code and are
unreadable by a human being.
- user id: A unique name or number that has been assigned to a
particular user so that the computer or network knows who that person is and
what he or she is doing.
-
2.4. Common commands
-
The commands in this section are:
-
|
Command
|
Definition
|
|
cal
|
View a calendar for a month or a year. The default is for the current month:
$ cal
December 2002
S M Tu W Th F S
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
You can ask for a specific month or year by giving the values 1 - 12 for January - December and the values 1 to 9999 for the
years 1 AD to 9999 AD. For example,
$ cal 9 1968
September 1968
S M Tu W Th F S
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
To see an entire year, skip the month (e.g.,
$ cal 53
will display the calendar for all of the year 53 AD). Note that in September, 1752, 11 days were left out of the calendar
to make up for skipped leap years, so the month skips from the 2nd to the 14th:
$ cal 9 1752
September 1752
S M Tu W Th F S
1 2 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
|
|
cat
|
Short for “concatenate,” cat lets you read multiple files. It reads each file in
sequence and prints them out to the screen. For example:
$ cat file1.txt file2.txt
This is file file1.txt
This is file file2.txt
You see the contents of the two files on your screen. You
can also use the “>” character to copy the contents of files
into a file. For example, if you enter:
$ cat file1.txt file2.txt > file3.txt
The
cat command will copy the contents of file1.txt and
file2.txt into a new files called file3.txt (however, if a file3.txt already
exists in the working directory, it will overwrite it).
|
|
cd
|
Use to move to another directory.
$ cd mydirectory/stuff
You can go back up a level by
using “…”
$ cd ../anotherdirectory
To return to the previous
directory, use “-“.
$ cd -
If you aren’t sure which directory you
are currently in use the
ls
command.
|
|
chmod
|
Change access permissions for a file, group of files, or
a directory. Access permissions consists of read (r), write (w), and execute
(x) permissions for the file owner, a group of users, and all others.You can
see the current settings for a file or directory with
ls –l
(figure 1).
 |
|
Figure 1
|
To change this file’s permissions, you use
chmod with arguments indicating which permissions you
want to change. You can do this two ways: in absolute mode or symbolic mode.
Absolute mode is more efficient but potentially confusing (see the
Webmonkey site
or the chmod man page for more information). Symbolic
mode uses a “+” or “-“ to add or remove permissions
from the user (u), group (g), other (o), or to all (a). The syntax looks like
this:
- chmod [u, g, o, or a]{+ | -}{a | w | x}
<file name>
For example, to give write permissions for the foo.txt
file to anyone you would enter:
$ chmod a+w foo.txt
Notice that there are no spaces
in the “g+w” argument. To remove write permissions from all, you
would simply change the “+” to a “-“:
$ chmod a-w foo.txt
If you want to change
permissions on every file in a directory, you can use the –R flag. For
example, to give everyone permission to read all files in mydirectory you would
enter:
$ chmod –R a+r mydirectory
|
|
chown
|
Change the owner of one or more files or directories. You
can use
ls –l
to
see who currently owns the file (see figure 1, above, for a full explanation of
the output). You must be logged in as the file’s current owner or as root
before you can change a file or directory’s owner. The syntax is
- chown <new owner> [: <new
group>] <file name>
The <new owner> name is the new
owner’s user id (e.g., jmu2m). You can assign a new group as well (e.g.,
staff).
As with
chmod
, you
can use the –R flag to change every file in a directory. You can also use
the –h flag to change the ownership of a symbolic link: if you
don’t use it, the ownership of the referenced file is changed (see
ln
for more
information about symbolic links).
|
|
cp
|
Copy a file or directory.
$ cp file1.txt file2.txt
Note that, in this example, if a file called file2.txt already existed in the current directory it will be overwritten.
You can also use this to copy a file into a different directory:
$ cp file1.txt /directoryA/directoryB/
This puts a copy of file1.txt in /directoryA/direcotryB.
You can use some short-cuts to copy groups of files.
$ cp *abc* /newdirectory
Copies all files that have the letters "abc" in their names. The "*" character is used to stand in for zero or more alphanumeric
characters, so this command would copy "abcfoo," "aabccc," and "fooabc." It would not copy "abfoo" or "aaaabbb." It would
not copy dot files (files beginning with the "." character), such as ".abcfoo" or ".aabccc." To copy a group of dot files
you must include the "." character. For example,
$ cp .* /newdirectory
would copy all dot files in the directory and
$ cp *.* /newdirectory
would copy all files, including the dot files, in the directory. On the other hand,
$ cp * /newdirectory
copies all files except the dot files.
$ cp foo* ../
Copies all files whose name begins with "foo" to the parent directory. You can use "../" more than once to indicate directories
that are multiple levels up the directory structures (e.g., ../../mydirectory).
To copy a directory, you must use the -r flag. E.g.,
$ cp -r * /newdirectory
In jefferson, the cp command is set in interactive mode, meaning that if you want to copy a group of files it will prompt you for confirmation
of each file.
|
|
date
|
Returns the current date and time. The superuser can also use this command to reset the system clock. To view the current
date and time, enter the command with no arguments:
$ date
Mon Dec 16 16:34:26 EST 2002
|
|
df
|
Displays the number of free disk blocks and files. It returns the amount of disk space occupied by mounted or unmounted file
systems, the amount of used and available space, and how much of the file system's total capacity has been used. There are
several flags described in the
man
page, but they aren't described in this document. Using it without any arguments will returns results something like this:
$ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/dsk/c0t0d0s0 2507805 1812658 644991 74% /
swap 3112912 32 3112880 1% /var/run
swap 4294200 1181320 3112880 28% /tmp
/dev/dsk/c0t1d0s0 8703705 1954391 6662277 23% /p1
/dev/md/dsk/d18 17500238 13424960 3900276 78% /d18
/dev/md/dsk/d6 17500238 13180583 4144653 77% /d6
/dev/md/dsk/d0 17500238 15063897 2261339 87% /d0
/dev/md/dsk/d12 17500238 16463002 862234 96% /d12
/dev/md/dsk/d21 17500238 16976865 348371 98% /d21
/dev/md/dsk/d3 17500238 15546452 1778784 90% /d3
/dev/md/dsk/d9 17500238 17184888 140348 100% /d9
/dev/md/dsk/d15 17500238 10829892 6495344 63% /d15
/dev/md/dsk/d24 17500238 15910585 1414651 92% /d24
/dev/md/dsk/d30 17500238 14263119 3062117 83% /d30
/dev/md/dsk/d27 17500238 15779913 1545323 92% /d27
/dev/dsk/c0t0d0s7 2021485 2382 1958459 1% /p0
/dev/md/dsk/d33 17500238 10664358 6660878 62% /d33
jeeves.itc.Virginia.EDU:/common
17694720 17274672 420048 98% /common
jeeves.itc.Virginia.EDU:/solaris
17694720 14257228 3437492 81% /solaris
This output contains a list of mounted disks in the jefferson filesystem, displaying the amount of used and available space,
and how much of the file system's total capacity has been used. Thus we can see that d9 is using 100% of its space and d15
is using 63% of its space. This is useful information if you are looking for space to add a new user's home directory.
You can run the command with the "." character to look up the disk that your current directory is located on. For example,
$ df .
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/md/dsk/d3 17500238 15549694 1775542 90% /d3
|
|
diff
|
Compares two files, line by line, and reports where there
are differences. The syntax is
- diff <file name1> <file
name2>
So, suppose that you have two files, foo.txt:
This is file foo.txt
It's a nice file
and bar.txt:
This is file bar.txt
It's a nice file but it has 3 lines of text.
If you run diff on these files you’ll get the following results:
$ diff foo.txt bar.txt
1c1
< This is file foo.txt
---
> This is file bar.txt
2a3
> but it has 3 lines of text.
The first
piece of output, 1c1, tells you that that line 1 in the two files is not the
same. It then shows the two lines. The second piece, 2a3, tells you that the
bar.txt has an extra line of text. If the files were identical, there would be
no output.
This can be very useful for debugging and comparing small text
files and scripts but the results can be confusing.
|
|
dos2unix
|
Convert a text file from the DOS extended character set to the corresponding ISO standard character set. This is useful if
you have ftp'd a document from a Windows file system to jefferson and want to get rid of end of file characters and so on.
You can run this in either a DOS or SunOS environment, but the file must conform to the conventions of that environment. Usage
is
- dos2unix [-ascii] <source file path> <target file path>
The default setting converts characters in the DOS extended character set to the corresponding ISO standard characters. The
-ascii flag removes extra carriage returns and converts end of file characters in DOS format text files to conform to SunOS
requirements.
|
|
eject
|
Ejects media from removable media devices (such as a floppy drive). Note that this will work only for devices that have Unix
pathnames: it won't work on a CD drive on a laptop. Usage is
- eject <device path>
For example:
$ eject /dev/dsk/c0t3d0s2
|
|
emacs
|
Emacs is a word processing program that can be run from the command line. It is an excellent tool for working with text-based files
but it may take some time to learn how to use it. It has a tutorial and help feature, which you may want to investigate. The
tutorial is quite tborough and a good starting point. To start an emacs session, type
$ emacs
You can include a file name if you want to open an existing file. E.g.,
$ emacs foo.txt
You can get help with Ctrl-h (hold the Ctrl and "h" keys at the same time)and see the tutorial with Ctrl-h t (hit Ctrl-h,
then hit "t").
While emacs is a good tool, there are other command-line word processing applications that you may find better suited to some jobs. For
simple jobs involving only a few files,
pico
or WordPad (on Windows machines) may be more efficient. We do not recommend jove because of the line length restrictions. Desktop word processors such as Word and Frame are helpful for writing documents,
although we don't recommend them for writing HTML pages or code.
|
|
find
|
Use this to find particular groups of files and
directories. This is a useful command to know. The syntax is
- find <path name(s)> <condition(s)>
You have to provide at least one <path name>
(i.e., a directory path) and <condition>. You can specify several path
names to look in multiple directories. The <condition> argument defines
the terms of the search. There are several possible conditions, and you should
look in Unix in a Nutshell or the find man page for a full discussion. The more useful
conditions are –name, -newer, and –user.
| -name <pattern>
|
Find files whose name matches
<pattern>.
|
| -newer <file>
|
Find files that have been modified after the file
named in <file>. You must provide a full path for the file (i.e., if the
file is not in your current directory you have to say where it is).
|
| -user <user id>
|
Find files belonging to the specified user
id.
|
For example, to find all .jpg files in /mydirectory,
you would enter this:
$ find /mydirectory –name *jpg
|
|
grep
|
Search one or more file for a pattern (called a regular expression). The command returns the names of all files that have
contents matching the regular expression, along with the line(s) which matches the
pattern. The syntax is
- grep <regular expression>
[<directory or full or partial file name>]
You can use the
“*” character to look for file names matching a certain pattern as
well. It may take a bit of practice to learn to finetune your searches,
since you may get matches that you didn’t intend (searches for the
word “red” for instance, will yield “retired”, “adored”, and “reduction”).
| *
|
A wildcard that matches zero or more
characters. For example, “foo*bar” matches
“foobar”, “foofbar”, “fooBARbar”,
etc. If you wanted to look in all .txt files, for example, you could use
“*.txt”:
$ grep foo *txt
You can also just use a
“*” to indicate that you want to look in all files in the current
directory.
$ grep foo *
|
| .
|
A wildcard that matches any one character. For
example,
$ grep f.le *txt
matches "file" and "filename" but not "fooled."
|
| [ ]
|
Use to indicate a possible range of characters,
such as the numbers 1 through 9. For example:
$ grep foo[1234]bar
foo1bar
foo2bar
foo3bar
You can search for the “*” and “.” characters by escaping them with a “\”. So:
$ grep foo[1234\*]bar
foo*bar
foo1bar
foo2bar
foo3bar
|
|
|
groups
|
Use to find out which group you or a specific user id
belongs to. For example:
$ groups spw4s
users staff samba
|
|
id
|
This command is used for user identification. The syntax is
- id [<user id>] [-a]
Used by itself, it returns the your current user id and the first group that you belong to.
$ id
uid=23304(spw4s) gid=100(users)
If you run it with an -a flag, it will show all groups that your user id belongs to.
$ id -a
uid=23304(spw4s) gid=100(users) groups=100(users),
10(staff),518(samba)
You can run it with another user id to see which groups that id belongs to. E.g.,
$ id jmu2m
uid=21953(jmu2m) gid=254(systems)
|
|
kill
|
Kill a process. The syntax is:
- kill [-9] <one or more PIDs>
The -9 is an optional signal which essentially tells the command to kill the process no matter what.
To run this command, you need to know the targeted process’s ID (PID). Run
ps
to
see a list of which processes are currently running and their PIDs. For example,
$ ps
PID TTY TIME CMD
2227 pts/37 0:00 emacs
21385 pts/37 0:00 ksh
$ kill -9 2227
$ ps
PID TTY TIME CMD
21385 pts/37 0:00 ksh
[1] + Killed emacs &
In this example, we first run ps and see that there is an emacs process running. We don't want this process anymore, so it's killed. Notice that kill doesn't return a message to indicate whether or not it succeeded, so we run ps again to check that the process did indeed die.
Note that you can only kill your own processes.
|
|
listusers
|
Lists users and their login names. If you run it without arguments it will display all user accounts on jefferson. You can
narrow down the list with the -g and -l options. Use -g to see users in a group:
$ listusers -g rossetti
acb5m Andrea Christina Bobotis
bpn2f Bethany Paige Nowviskie
caw7y Craig Warren
cls4r Christina Lynne Svendsen
cls9k Charles L. Sligh
djr4r Damian Judge Rolliso
dvp4c Daniel V. Pitti
jjm2f Jerome J. McGann
mem8h Monica Eileen McTighe
mmt4e Maura M. Tarnoff
msk5d Melissa Smith Kennedy
mw2w Melissa White
rs8cw Rivka Swenson
sjr3a Stephen Ramsay
wjh7v Bill Hughes
Use -l to see who is associated with particular login names. Separate names with a comma:
$ listusers -l spw4s,jmu2m,sjr3a
jmu2m John Merritt Unsworth
sjr3a Stephen Ramsay
spw4s Sarah Parsons Wells
|
|
less
|
This lets you browse through one or more files. It is very similar
to the
more
command, except that you can move backwards and forwards. To
see a single file, enter less with the name of a file:
$ less foo.txt
Hit the space bar or the down arrow
to move forward through the file and the up arrow to move backwards.
To see several files, you can enter the files names in sequence or use a regular expression to describe a pattern (such as *.txt to look at all .txt files).
$ less foo.txt bar.txt
When you get to end of the first file in the list, type :n to see the next file. At any point you can type :p to see the previous file or q to quit and get back to the command line.
|
|
ln
|
Make links to remote files. There are two different kinds
of links: hard and symbolic. A hard link is a pointer to a file which is
actually located in a different directory and is indistinguishable from the
orginal file. A symbolic link is an indirect pointer that only contains the
file path of the original file. You can call that name to access the remote
file. The syntax is
- ln [-s]<file path> <link name>
The –s flag makes a symbolic link. For example:
$ ln –s /stuff/myfile.txt foobar.txt
Note that
the link name foobar.txt is treated as a normal file, which may cause
problems if you already have a file named foobar.txt (that is, you will lose your previous file). However, you can easily
identify symbolic links when you run
ls
, since they have a
“@” character next to their names:
$ ls
foo.txt
foobar.txt@
bar.txt
Use ls –l to see where the link points to and information about the original file:
$ ls -l foobar.txt
lrwxrwxrwx 1 spw4s users 13 Jul 26 12:02
foobar.txt -> stuff/myfile.txt
|
|
lpr
|
Use this to print a file from the command line. You may need to provide a printer name. The syntax is
- lpr [-P<printer name>] <file name>
Note that there is no space between the -P and the printer name. The standard printer on jefferson is the black and
white HP laser jet near the IATH conference table. Its name is av_l1, so to send a printing job there you would enter
$ lpr -Pav_l1 foobar.txt
If you do not specify a printer, the job will be sent to the default printer (which is probably av_l1).
You can check the status of print jobs from the command line with the lpq and lpstat tools. The first checks the queue status of
|
|
lpstat
|
Shows the status of the printers. There are many options, but in jefferson you'll most likely just use the command with the
printer name. The main printer in IATH is called av_l1. The output will look something like this:
$ lpstat av_l1
Printer: av_l1@print
Queue: 1 printable job
Server: pid 14203 active
Unspooler: pid 14227 active
Status: processing 'dfA181jefferson.village.Virginia.EDU',
size 192, format 'f', IF filter 'ifhp' at 16:27:28.831
Filter_status: using model 'hp4050' at 16:27:31.615
Rank Owner/ID Class Job Files Size Time
1 spw4s@jefferson+181 A 181 bar.txt 192 16:27:21
|
|
ls
|
Lists the contents of the directory. There are several
options available with this tool, but the more useful ones are –l and
–a. The –l option displays the files in long format, meaning that
it shows each file’s permissions, owner, date last modified, and byte
size (please see figure 1 for an example). The –a option lists every file
in the directory, including those whose name begins with a dot (those are
called dot files and are normally not listed). The syntax is:
- ls [-l] [-a] <file or directory
name>
|
|
man
|
Displays the Unix help page that comes with the command. Usage is
- man <command name>
Hit the space bar to page down.
Note that the man pages are written by the programmers who wrote the command, so the pages have varying degrees of coherency
and different assumptions of the reader's technical knowledge. A man page should have the following elements: a brief summary
of the command's function, complete syntax, a textual description of the command, an explanation of the options and operands,
usage examples, and a list of environment variables.
|
|
mkdir
|
This will create a new directory. For example,
$ mkdir newdirectory
This creates a directory called
“newdirectory” in the current directory. Note that the default
permissions settings in a new directory give everyone permission to read the
contents of the directory but only the owner (you) has permission to write to
the directory. You can use
chmod
to
change permissions.
|
|
more
|
This is very similar to the
less
command, except that it only lets you move forward through a file. To use,
enter more along with the name of the file.
$ more foo.txt
Hit the space bar to move forward
through the file.
|
|
mv
|
Use to move files and directories. For example:
$ mv foo.txt /mydirectory
This moves foo.txt from
the current directory to mydirectory. You could also move an entire directory:
$ mv /mydirectory /stuff/newdirectory
Note that
mydirectory will no longer exist, but that all of its files will now be in
newdirectory.
Be careful when moving multiple files, since the new files
will overwrite existing files of the same name. The default setting of this
command on jefferson will post a warning message if you are about to overwrite
a file. You can use the –f flag to override this setting.
|
|
passwd
|
Create or change your jefferson password. To use, just
type in passwd. You will be prompted for your current
password and then asked to type in the new one. Please note that this will not
change your Windows NT server password.
The command will check your password to see if it can be guessed or is too close to your old password, so you may
want to have a couple of possibilities in mind.
You can cancel this command midway through by hitting Ctrl-q.
|
|
pico
|
Pico is a simple text editor and is very useful for simple editing or for small text files. If you are working with large
files you would be better advised to use another text editing program, such as emacs or vi. We do not recommend jove as a text editor. The syntax is
- pico [<file path>]
You can type in a new or existing file name: if you type a new name or no name pico will create a new file. A new file looks
something like figure 2:
 |
|
Figure 2
|
Type in the text as you would in any basic word processing application (such as Notepad). ou can use any of the commands listed
in the footer by hitting the Ctrl key plus the specified letter. Hit Ctrl-a to move the cursor to the beginning of the line
and Ctrl-e to move to the end of the line. Use Ctrl-d to delete characters. To cut and paste, use Ctrl-k to cut a line (hold
down the Ctrl key and hit "k" multiple times to cut more than one line) and Ctrl-u to paste. To save to a file without closing
the window, hit Ctrl-o then type in the file name. To insert a text file into the current window, hit Ctrl-r then type the
file's path. To exit, hit Ctrl-x. If you haven't saved your work, you will be asked if you want to save.
Note that there is no man page for pico, but get to the pico help screen with Ctrl-g.
|
|
ps
|
List information about processes currently running. You
will see a list of processes that you own.
$ ps
PID TTY TIME CMD
20903 pts/62 0:00 emacs
20318 pts/62 0:00 ksh
This output shows that two processes are running. The PID column
gives you each process’s id (PIDs can be useful for tracking and killing individual processes), the TTY column identifies the terminal
where the command’s output is being displayed, the TIME column shows how
long the process has been executing (if it is actively executing), and the CMD
column tells you that name of the command.
There are several flags that you can use to change this list. The -f flags shows a full listing of all information about each
process:
$ ps -f
UID PID PPID C STIME TTY TIME CMD
spw4s 20903 20318 0 10:42:05 pts/62 0:00 emacs
spw4s 20318 20283 0 10:37:49 pts/62 0:00 -ksh
The UID column is the user id of whoever owns the process (that is, whoever started it). You can ignore the PPID and C columns.
STIME shows when you started the process.
You can use -a to see a longer list of programs currently running. If you use it with -f, you'll get a more complete picture.
$ ps -af
UID PID PPID C STIME TTY TIME CMD
root 21967 670 0 0:00 <defunct>
patrick 25013 24998 0 11:35:23 pts/39 0:00 /bin/bash
sjm8k 21952 21941 0 10:56:17 pts/64 0:00 pine
jjm2f 3863 11467 0 0:42 <defunct>
root 22279 20340 0 11:00:55 pts/63 0:00 -ksh
mfr2v 24749 24733 0 11:31:38 pts/59 0:00 pine
spw4s 20903 20318 0 10:42:05 pts/62 0:00 emacs
spw4s 13069 13060 0 09:02:56 pts/34 0:01 pine
root 25024 20318 0 11:35:27 pts/62 0:00 ps -af
root 9022 670 0 0:00 <defunct>
kat2n 15143 15058 0 Aug 20 pts/30 0:01 pine
jjm2f 7589 4884 0 0:00 <defunct>
pmc 15561 15543 0 09:51:27 pts/6 0:06 pine
jjm2f 7035 11467 0 0:45 <defunct>
Finally, you can use -A or -e to see the absolutely complete list of all processes currently running. This list includes processes
that are not associated with a terminal (such as daemons).
|
|
pwd
|
Show the present working directory. This shows the absolute path name for your current directory. For example,
$ pwd
/institute/web
|
|
rm
|
The rm command can be used interchangeably with the
rmdir
command. This removes files and directories. Usage is:
- rm <file/directory name(s)>
If you are removing multiple files or a directory you will be asked to confirm each
file. E.g.,
$ rm foo*txt
rm: remove `foo.txt'? y
rm: remove `foobar.txt'? y
Enter “y” for yes and “n” for no.
This is intended to prevent accidental deletions, but it can be irritating and
time-consuming if you are trying to delete several files. You can use the
–f flag to remove all files without prompting.
You must have write permissions to the file(s) you are trying to remove.
|
|
script
|
Creates a text file with a record of your terminal session. To start a script, type script plus a file name. This will start a sub-shell in your current window, so it will only record activity in that window. To
end a script, hit Ctrl-D or type "exit". You can use
less
or any text editor to view the text file. For example:
$ script script_record
Script started, file is script_record
$ ls *txt
bar.txt descfile.txt foo.txt foobar.txt@
$ exit
Script done, file is script_record
This started a script using a file called script_record to record the script. We can now view the file:
$ less script_record
Script started on Mon Dec 09 15:52:45 2002
$ ls *txt
bar.txt descfile.txt foo.txt foobar.txt@
$ exit
script done on Mon Dec 09 15:52:51 2002
This shows exactly what appeared in the terminal, including the command line prompt as well as the timestamp for beginning
and ending the script.
|
|
sed
|
This is an editing utility: the name is an abbreviation of "stream editor." It reads one or more text files and edits them
according to your instructions. This is useful if you need to make a global change to several documents (such as a search
and replace). The command looks at each line of the input files, copies it to an internal buffer (called a "pattern space"),
applies the editing commands to the line (if appropriate), and prints the output to either the command line or to a file.
Note that the output does not overwrite the original input files since sed is working in the pattern space.
You can give the editing instructions on the command line or in a separate script. You can tell it to search for lines with
particular patterns. For example, you can look for all lines containing the word "automobile" and then replacing that word
with the "car." Or to print all lines that between the words "START" and "END".
Unix in a Nutshell has a chapter devoted to sed and is reasonable place to start. If you want to start writing serious scripts you can also look at IATH's copy of sed & awk (another O'Reilly book), which also has some useful information about using regular expressions (part of pattern matching).
|
|
ssh
|
Open a secure shell to another server. To open the shell under your current user id, type ssh plus the name of the server. You will be asked for your account password. It will look something like this:
: ssh jefferson.village.virginia.edu
spw4s@jefferson.village.virginia.edu's password:
Last login: Tue Dec 17 2002 14:14:20 -0500 from mamba.cs.Virgini
Welcome to jefferson.village.virginia.edu
Home of the Institute for Advanced Technology in the Humanities
You have mail.
Enter terminal type [default is vt100]:
$
Hit the return button to accept the default terminal type setting (not all servers will ask for this information).
To open the shell under a different user id, use the -l argument plus the user id:
$ ssh -l jmu2m jefferson.village.virginia.edu
You'll be asked for that user id's password.
The first time that you open a shell into a new server, you may get a warning message about the host's authenticity. The command
automatically maintains and checks a database containing the host public keys (identification numbers for verifying the host's
identity). When logging on to a host for the first time, the host's public key is stored in a file called .ssh2/hostkey_PORTNUMBER_HOSTNAME.pub
in the user's home directory.
$ ssh jefferson.village.virginia.edu
The authenticity of host 'jefferson.village.virginia.edu
(128.143.22.122)' can't be established.
DSA key fingerprint is
d0:a5:6f:c8:fc:4c:c8:4d:e3:b2:8a:2b:5d:a2:15:15.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added
'jefferson.village.virginia.edu,128.143.22.122' (DSA) to the
list of known hosts.
spw4s@jefferson.village.virginia.edu's password:
Last login: Tue Dec 17 2002 14:11:42 -0500 from d-128-200-236.bo
Welcome to jefferson.village.virginia.edu
Home of the Institute for Advanced Technology in the Humanities
You have mail.
Enter terminal type [default is vt100]:
$
If a host's identification changes, the command returns a warning and disables the password authentication in order to prevent
a Trojan horse from getting your password or a man-in-the-middle attack. In this case, you should consult the system administrator.
To exit a shell, type exit.
$ exit
Connection to jefferson.village.virginia.edu closed.
$
|
|
stty
|
Sets options for your terminal. There are many options here, so you really should see the man page for a complete list. However,
a practical use that you may like to know about is to set a backspace key for working on the command line. To do this, run:
stty erase [hit desired backspace key]
The key you hit will then act as a backspace/delete key.
|
|
su
|
Change user ids without having to log out. Usage is
- su [-] <user id>
For example:
$ su spw4s
Password:
$
This changes your current user id but does not change your current directory or environment. Use the "-" flag if you want
to change over to another user's environment. For example:
$ su - spw4s
Password:
Welcome to jefferson.village.virginia.edu
Home of the Institute for Advanced Technology in the Humanities
You have mail.
Enter terminal type [default is vt100]:
jefferson: /home/spw4s $
This changes your environment and your current directory to the user's home directory.
|
|
tail
|
Use to view the last part of a file. You can specify a starting point and the command will show you the rest of the file starting
from that point. Basic usage is:
- tail [+<number>][-f | -r] <file name>
(Notice that there is no space before the number.) The number is the line number. You can also specify units of lines, bits,
and blocks (see the man page for instructions).
The -f flag is useful for following the progress of a file that is being altered by another process. It shows the file or
the specified end portion of the file and continues in an infinite loop (i.e., doesn't end and take you back to the command
line) printing out new lines as they are added to the file.
The -r flag displays the file or specified end portion of the file in reverse.
|
|
type
|
Prints information about a command, indicating if the command is a shell, a function, an alias, a hashed command, or a keyword,
and where applicable, may display the operand's path name. Usage is:
- type <command>
This is a useful tool for finding out where the binary for the command is located and whether or not it is an alias. For example,
if we run it with the
cp
and
lpr
commands:
$ type cp
cp is an alias for cp -i
$ type lpr
lpr is /usr/local/bin/lpr
We can see two different kinds of results. The first shows that in jefferson, cp is an alias for running cp with the -i flag. Since the lpr command is not an alias but runs the binary file, type prints the binary's location.
|
|
tar
|
Copy files and directories to a single file, called a
“tarfile”. (Tar originally meant “tape archive” and was used to
archive files.) You use the same command to open a tarfile. If you are tarring
a directory with subdirectories, the file structure will be preserved in the
tarfile. Note that when you open the file it will copy the structure into the
file space where the tarfile is located.
The tar
command has several options, which are described in full in the man page and
the Unix in a Nutshell book. it is frequently used with
the zip command, which compresses the file to a more
manageable size. For best results, use the following syntax to create a
tarfile:
$ tar -cvf <filename>.tar <file/directory name>
This creates a file called <filename>.tar. It does not
delete the original file or directory. You now have a tarfile, but it is
probably rather large (especially if you tarred an entire directory). You can
use zip to compress the tarfile:
$ zip <filename>.tgz <tarfile name>
The
.tgz suffix indicates that this a tarred and zipped file. To unzip and untar
the file, use this syntax:
$ unzip <filename>.tgz
$ tar -xvf <tarfile name>
This will extract and copy the contents of the tarfile. It will
retain its same naming structure. The .tgz and .tar files are not deleted, but
must removed by hand.
Tarfiles are a convenient form for moving directories and large sets of files via ftp, Fetch, etc. You can open them on Windows and Mac machines with the proper applications (e.g., WinZip).
|
|
whatis
|
The whatis command displays a
one-line summary of any documented Unix command (i.e., any command that has a
man page). For example,
$ whatis ls
cp cp (1) - copy files
|
|
whois
|
This is a UVa directory service for getting information
about UVa users. If you enter a user id it will print out information from the
UVa database. :
$ whois spw4s
Name: Sarah P. Wells
Mailid/Handle: spw4s
Unix Uid: 23304
Classification: Staff
Department: Rs-Inst Adv Tech Humanities
Office Address: Alderman Library 3rd Fl W.
Office Phone: (434) 924-4527
(434) 924-4370
Registered E-Mail Addr: spw4s@Virginia.EDU
spw4s@s.mail.virginia.edu
If you don’t know the person’s user id you can provide part of the name (e.g., whois wells). Note, though, that if you are looking up a common name you'll be asked for more information.
$ whois wells
There are 57 database matches to your search key 'wells'.
Please try another search key. See the manual for whois
if necessary. You can use the "whois -a" option to list
all database matches. See also: "whois help".
In this case, you'll need to provide more of the name:
$ whois "wells, sar"
Name: Sarah P. Wells
Mailid/Handle: spw4s
Unix Uid: 23304
Classification: Staff
Department: Rs-Inst Adv Tech Humanities
Office Address: Alderman Library 3rd Fl W.
Office Phone: (434) 924-4527
(434) 924-4370
Registered E-Mail Addr: spw4s@Virginia.EDU
spw4s@s.mail.virginia.edu
|
3. Password protection for a web directory
To create password protect for a web directory (i.e., directories in a /public_html directory), use an .htaccess file. This
file controls access to a particular directory and requires that users provide a user name and password in order to view the
directory's contents on the web (including its sub-directories). Note that this won't prevent access from the command line.
Note also that this is not the same as a Unix user id.
There are two steps in this process. First, you need a text file called ".htaccess" in the directory you want to protect.
Then you must run the htpasswd command to match the user name with a password.
-
3.1. The .htaccess file
-
The .htaccess file is a text file called ".htaccess" (not ".htaccess.txt" or "htaccess")that sits in the directory that you
want to protect. The file should contain the following lines:
AuthUserFile /home/spw4s/password_directory/.mypasswords
AuthGroupFile /dev/null
AuthName ByPassword
AuthType Basic
<Limit GET>
require user spw4s
</Limit>
The AuthUserFile is the full path name for your password file (note that you can use this file for multiple .htaccess files).
You can put the password file anywhere you like, but we suggest that you put it in a safe location. The file can be named
anything that you like as long as its name begins with a dot ("."): .htpasswd or .mypasswords or .foobar. The AuthGroupFile
line should be /dev/null unless you are using a group file (see http://hoohoo.ncsa.uiuc.edu/docs/tutorials/user.html for more information). The AuthName and AuthType can be written as shown here.
-
The <Limit> directive shows which methods the user name-password pair apply to. In this example it applies to GET methods
only. You could also have POST and PUT in this section, if you are using CGI scripts and want to require a password for those
methods, but you will usually just want GET. The "require user" line indicates that you will require a user name of spw4s.
-
We strongly suggest that you restrict writing privileges of this file with
chmod
.
-
3.2. Creating passwords
-
Use the htpasswd command to assign a password. The command creates a text file that contains the user name and its (encrypted) password. One
password file can contain multiple user name-password pairs.
-
The usage is
- htpasswd [-c] <password file> <user name>
The -c flag indicates that you are creating a new file. Note that if you type the command name with no arguments you will
get a help statement.
-
To create a new file for the .htaccess file above, move to the directory where you want the file to reside (/home/spw4s/password_directory/
in the example above) and run it with the -c flag:
$ htpasswd -c .mypasswords spw4s
New password:
Re-type new password:
Adding password for user spw4s
The new .mypasswords file is a text file and can be viewed and edited with any text editing tool (we don't recommend
this, however). It looks something like this:
$ less .mypasswords
spw4s:Dry6k2I.wawT.
-
If you later decide that you wanted to change the password, run the command again and type in the new password.
$ htpasswd .mypasswords spw4s
New password:
Re-type new password:
Adding password for user spw4s
We strongly suggest that you restrict the file's write privileges with
chmod
and put it in a directory outside /public_html.
-
To add another user name-password pair to an existing password file, run the command with the different user name. For example,
if you have another .htaccess file in a different directory that points to .mypasswords in the AuthUserFile line, you can
run htpasswd again without the -c flag and with the new user name:
$ htpasswd .mypasswords clm6u
New password:
Re-type new password:
Adding password for user clm6u
The .mypasswords file now looks like this:
$ less .mypasswords
spw4s:Dry6k2I.wawT.
clm6u:WyNVg5YtDHHgE
4. Adding a new machine to the network
This section takes you through the steps of adding a new Windows machine to the IATH NT network. You will need to be logged
in as administrator. The steps to follow are listed below. Please note that you may end up having to tweak the settings slightly:
if you haven't done that before please talk to Cindy or Robbie first.
- In the Start menu, click Settings then Network and Dialup Connections.
- Select Local Area Connection and click Properties. This takes you, logically enough, to the Local Area Connections Properties window.
- Click Internet Protocal (TCP/IP) from the list of components then click Properties. This opens the Internet Protocal Properties window. In this window, select Obtain an IP address automatically and Use the following DNS server addresses. You will then need to enter these two DNS addresses:
- Preferred DNS Server : 128.143.2.7
- Alternate DNS Server : 128.143.22.119
- Next, select Advanced. In the IP Settings view, make sure the IP address section reads "DHCP Enabled." Click the DNS tab and under DNS server addresses,
enter, in order:
- 128.143.2.7
- 128.143.22.119
- 128.143.3.7
Click Append these DNS suffixes and enter
- village.virginia.edu
- virginia.edu
Select the WINS tab and enter the following addresses
- 128.143.22.122 (or 125?)
- 128.143.200.61
- Click Enable LMHOSTS lookup and Use NetBIOS setting from the DHCP server. Click OK in this and the remaining windows to exit the network settings windows.
- Open the Start menu and click Settings again. Click Control Panel and doubleclick the System icon. This will open a Systems Properties window. Click the Network Identification tab then click Properties to join the IATH domain.
5. Creating a new account and home directory
This section describes how to create a new account and home directory for a new user on jefferson by taking you step-by-step
through a fictional example. Note that you will have to log in as root to create the account. Be sure that you don't forget
to log out when finished.
- First you need to create a directory for the new user. You need to choose a disk that has room for the account (disk here
refers to a section of the jefferson hard drive that is partitioned and labeled). The best way to do this is to look around
with the
df
command (you could use the account-creation software for this, but df is the preferred method).
$ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/dsk/c0t0d0s0 2507805 1775521 682128 73% /
swap 3270176 32 3270144 1% /var/run
swap 4388544 1118400 3270144 26% /tmp
/dev/dsk/c0t1d0s0 8703705 1952397 6664271 23% /p1
/dev/md/dsk/d18 17500238 13342155 3983081 78% /d18
/dev/md/dsk/d6 17500238 13160378 4164858 76% /d6
/dev/md/dsk/d0 17500238 15059958 2265278 87% /d0
/dev/md/dsk/d12 17500238 16449145 876091 95% /d12
/dev/md/dsk/d21 17500238 16705511 619725 60% /d21
/dev/md/dsk/d3 17500238 15490403 1834833 90% /d3
/dev/md/dsk/d9 17500238 17169785 155451 100% /d9
/dev/md/dsk/d15 17500238 10617058 6708178 62% /d15
/dev/md/dsk/d24 17500238 16672281 652955 97% /d24
/dev/md/dsk/d30 17500238 14198009 3127227 82% /d30
/dev/md/dsk/d27 17500238 15760936 1564300 91% /d27
/dev/dsk/c0t0d0s7 2021485 2382 1958459 1% /p0
/dev/md/dsk/d33 17500238 10664358 6660878 62% /d33
jeeves.itc.Virginia.EDU:/common
17694720 17637348 57372 100% /common
jeeves.itc.Virginia.EDU:/solaris
17694720 14257228 3437492 81% /solaris
User accounts can only be created on the /dev/md/dsk/d** disks (e.g., not on jeeves or /dev/dsk/*). Put the new account on
the disk with /dev/md/dsk/d** disk with themost space. In this example, d21 is the best candidate.
- Next, you want to create the new account in the disk's /user directory, which will be inside an /lv# directory. Continuing
the example, we move to /d21 and run ls to get the name of the /lv# directory:
$ cd /d21
$ ls
./ ../ .uva.itc.fs.dir/ lost+found/ lv6/
We then move to /lv6/users, and create a new directory for the new user with
mkdir
. We're using "clm6u" in these examples as the sample new user's user id.
$ cd lv6
$ ls
./ ../ TT_DB/ users/
$ cd users
$ mkdir clm6u
Notice that the user's home account name should be the same as the user id.
- Before you go any further, be sure that the user has a university id and doesn't already have an account on jefferson. Use
whois
to check for a university id:
$ whois mazza
Mazza, Cynthia L. (clm6u) Staff Rs-Inst Adv Tech Humanities
If you don't find one, ask the user to contact ITC and have one created.
Use
id
to make sure she doesn't already have an account on jefferson:
$ id clm6u
id: invalid user name: "clm6u"
- Now you can create a new jefferson account. Check to be sure that you are logged in as root, if you aren't sure:
$ id
uid=0(root) gid=1(other)
Use
su
to change over to the "accounts" user id to create the new account. This will automatically start the account creation process.
You will be asked to define the new user, give the absolute path name for the new directory that you created earlier, select a login shell type (choose /bin/ksh), and select an initial password
(our default is "!!" plus the user id). When asked for a SSN or login id, enter the user's university-assigned id (clm6u,
in this example).
$ su - accounts
Welcome to jefferson.village.virginia.edu
Home of the Institute for Advanced Technology in the Humanities
wtmp begins Thu Jun 15 12:16
Enter your terminal type (default vt100):
1: add new account(s) with "adduser"
2: delete an account
3: change an account
4: read mail
5: display "adduser" results
6: see if user already has account
7: command shell
q: quit (logoff)
jefferson Your Choice: 1
Select type of account to add
1: Personal Account
2: Generic Account
q: quit
Your Choice: 1
(NOTE: if this is someone outside the university, select 2)
Select User Classification
1: Faculty
2: Graduate Students
3: Ungraduates
4: ITC Staff
5: other staff
6: Look up user for me
q: quit
Your Choice: 5
Select directory to put user(s)
1: /users
2: default for user's classification
3: use existing directory (do not create new dir.)
4: use Home Directory Service directory (do not create new dir.)
q: quit
Your Choice: 3
Enter absolute path to home directory: /d21/lv6/users/clm6u
Select login shell for user(s)
1: /bin/ksh
2: /bin/csh
3: /bin/sh
4: /usr/local/bin/tcsh
q: quit
Your Choice: 1
Enter expiration date for account(s) (mm/dd/yy or 'none'): none
For building initial password from loginid,
enter short character sequence (default is %%): !!
Enter a SSN or loginid (or 'e' to end): clm6u
Adding the new account(s) please wait...
Adduser results from 16 Apr 2002 22:55
Adding clm6u loginid = clm6u uid = 96063 passwd = !!clm6u
Warning: The revalidation software is not installed on jefferson,
so clm6u is permitted to select a weak password.
Adding clm6u:OBD9ZIkgEJXuA:96063:10:Cynthia L. Mazza:/home/clm6u:/bin/ksh
to /var/yp/passwd
updated passwd
pushed passwd
`passwd' is up to date.
These messages are stored in file
/home/accounts/results/2002.04.16.22.55
1: add new account(s) with "adduser"
2: delete an account
3: change an account
4: read mail
5: display "adduser" results
6: see if user already has account
7: command shell
q: quit (logoff)
jefferson Your Choice: q
The "pushed" messages indicate that the password and username have been pushed out to yppasswd, the Solaris cluster-management
package that ITC uses to share passwords across machines within a solaris cluster, like IATH's.
Be sure to tell the user to change the default password over to a new password as soon as possible (with the
passwd
command).
- Check the new /users directory you created previously to be sure that the new user owns the directory by running
chown
and
ls -la
:
$ cd /d21/lv6/users
$ chown clm6u:users clm6u
$ cd clm6u
$ ls -la
total 4
drwxr-xr-x 2 clm6u users 512 Apr 16 22:53 ./
drwxr-xr-x 32 root other 1024 Apr 16 22:53 ../
- Stay in the /d21/lv6/users/clm6u directory. You will have to copy a set of dot files (files whose name begins with a "." character)
from /home/accounts/newuser to the new directory. Dot files are Unix files used for login and run-control support. To see
the files, run ls:
$ ls /home/accounts/newuser
./ .dtprofile .profile .xinitrc
../ .exrc .tcshrc .xinitrc.csh
.Xdefaults .kshrc .tvtwmrc .xinitrc.ksh
.Xresources .login .twmrc public_html/
.ab_library .mwmrc .variables.csh
.cshrc .pinerc .variables.ksh
These files have been customized to the jefferson platform and should not be altered. Copy them with
cp
:
$ cp /home/accounts/newuser/.??* .
The ".??*" extension to the file path name ensures that all files beginning with . and having more than two characters are
copied, but files in the ../ directory (the parent directory) are not accidently copied.
You will need to transfer ownership of these files to the new user with chown:
$ chown clm6u:users .??*
- Verify that you're still logged in as root, then move to the /etc directory and open the "group" file (the example uses
emacs
but you could use
pico
instead).
$ id
uid=0(root) gid=1(other)
$ cd /etc
$ emacs group
The file contains a list of all groups in jefferson, and you need to add the new user id to the appropriate groups (new IATH
staffers should be in staff and iath, new grad students should be in the appropriate research groups). Then save and close
the file. You can check your results with
id
:
$ id -a clm6u
uid=96063(clm6u) gid=10(staff)
groups=10(staff),100(users),200(av),205(iath),254(systems)
And that's it.
Notes
1. Check with Chris or Felicia if you aren't sure which one to use. [back]
2. This application doesn't validate, so don't use it you know what you're doing and you're using a separate validator [back]
© 2002 IATH at the University of Virginia. All rights reserved.
|