RATS Installation Guide


Preparation
    Before you get started, you are going to need to do a little preparation. First, RATS is not supported on solaris 2.5 or earlier. It may work, but we won't guarantee it. If your machine is not yet up to 2.6 or later, you need to upgrade your machine before proceeding. Second, RATS is distributed as a tint package. It also has lots of other packages as dependencies. You will need to make sure tint is usable on your machine. Head on over to http://tint.rutgers.edu for more info on tint. Once you have sorted out these two issues, you should be ready to try your hand at installation. If you are going to use the database version, you probably should also make yourself a mysql user/group. The username has been reserved for system use university wide in RATS. This is not a requirement.

Installation
    First, you want to back up your data. If you have previously installed RATS V1.X, you will want to back up the installation someplace after shutting down the previous installation of RATS. If you haven't, you will want to back up the passwd, group, and shadow files. (Although the installation should not damage these three files, but better safe than sorry) Next you are going to need to install the required tint packages. You want to get the following packages from tint (if you don't already have them installed):

Once tint has installed all of these, everything should be in the right place to get started. At this point, you need to decide which mode you want to operate RATS in. You have a choice of flat file mode, or database mode. Flat file mode is similar to RATS V1 in operation with the exception of additional calls supported through the API, and some new files. Database mode uses a Mysql database installed on the client system to store all the data that was previously stored in the various flat files. To pick between the two, you set the $USE_CLIENT_DB in the config file to a database name, or set it as null (i.e. "" or comment it out, whatever you do DO NOT SET IT TO "mysql") to use flat files. Before you turn RATS V2 on, there are some things you need to take care of.

    Both DB mode and flat file mode require you to take several common steps before you are ready to roll. You will have to install a rats daemon on each machine performing an account creation service (i.e. quotas, home directories, etc.). You will also have to decide weather each of these things will reference a single config file or multiple copies of the same config file. You will also need to get your web server ready if you are going to use any of the web apps.

     If you are using DB mode, there are some things you have to do in addition to the regular preparation. First you must set up Mysql.  The tint package puts it in the right place, then you run /usr/local/mysql/bin/install_mysql_db, next run /usr/local/mysql/bin/safe_mysqld (this should be run at every boot, so set it up to do so). Once mysql is set up, you need to run the installer that will put your data into the database. You do this by running "ratsfmt -o install". It should load everything into the database. Be warned though, it will also destroy any database with the name you have specified in your config file. If you are currently using mysql on your system for other purposes, some of these steps may be unnecessary, or need to be changed (we'd love to tell you how, but we have no idea what you are using mysql for or how you might have configured it differently from a default install).

    In DB mode, you also have to make sure applications that write to the passwd, group, and shadow files are unavailable to your users and admins (or at least the admins know not to use them, use common sense here, were not telling you to remove emacs, just know that the flat files are trusted for reads only in the database setup). This needs to be done because the database is the trusted source of information, and will just overwrite any changes made to the flat files with those tools. Some of these tools just need to be avoided because they are unsupported by RATS V2's database mode, but some needed replacements:

The vipw replacements are really the only important new administrator tools. Most of the tools necessary for administering accounts using RATS existed in V1, and still exist and function in V2, though some (like ratsadmin) have changed some and you should re-read the documentation. The VIPW replacement is for use with only DB mode, the other three will work with both flat file mode and DB mode. Before you set any of these web apps up, it is suggested that you read the documentation on them, and plan for some type of security (i.e. radius or something) to restrict use of them to the appropriate people. Finally, use of the client db requires you to set up a cron job that will run "ratsfmt -o pdump" at regular intervals to flush the data from the DB to the flat files so the system can see changes. A pdump takes about 20 seconds, on a large system.

   One other issue you may need to consider, is the idea of account types.  As of RATS V2, a record is made on you machine whenever a account type is added to a user.  However your existing accounts (generated by RATS V1 or not) do not have this association made. Before you expire accounts on your machine you may wish to add all the relevant account types to your user.  To do so we provide a small tool named "ratsat" which creates the associations in either the flat file or database table. However you will still need to determine which of your users already have what account types.

    At this point, you should be ready to crank up the basic daemons and start playing with the tools available to you. If you really want to test out rats, and have a handful of users available to play with, but don't want to mess with their passwords in kerberos, just change the config to believe you use crypt. You can then play with people who already exist without really mucking with their data (as long as you choose to not update their email address with new stuff).