Skip to content

Linux at NC State

wiki support   search:

Login Configuration

There are a couple of different ways to control logins to a machine. You can control it to the point that just a specified list of people can log in, or you can allow a group of people who are in certain Hesiod groups log in.

Allowing a List of Users to Log In

One of the most common tasks is allowing users other than root to log in. The simplest way to do this is to just add the usernames to /etc/users.local. The file format is one user to a line, like this:

jjneely
jwbernin
ebpeele2

By adding a user to /etc/users.local, you allow them to log in both locally, and via ssh. These users are also allowed to log in at the virtual terminal consoles, mentioned elsewhere in this document. You should generally only add yourself and various network administrators to this file. For large groups of people, you probably want to set the machine up for clusters

Allowing a list of users to login via the /etc/users.local can also be done graphically or textually with realmconfig. Run realmconfig and select the Users configuration option. You will be able to add and subtract users from the list.

Using Clusters to Control Logins

The main method used under Solaris on campus to allow logins is the use of Hesiod clusters. The Realm Linux can also be configured to use Hesiod clusters to control login access. Cluster configuration is done with the realmconfig tool.

To configure clusters on your machine log in as root and type realmconfig at the prompt. When the tool starts an introductory screen will be displayed that contains some general, but important, information. In text mode the Ok button should be highlighted, if not do so with the Tab key and press Enter. On the following menu, or on the left side of the window in graphical mode there will be an option for Clusters, highlight that option with the arrow keys or mouse and press Enter.

At this point you will see check boxes to enable clusters for both local logins and remote logins. Local logins are logins from a person that is physically in front of the machine while remote logins are logins that happen over SSH, Telnet, or the like. Use the space bar to enable clusters as you like. When enabled you can also fill in the cluster text entry. When used, this text entry defines the cluster you want to use. When you are finished configuring clusters in text mode use the Tab key to highlight Ok and press Enter to have the changes take effect. In graphical mode use the mouse to click the Apply to have the changes take effect. To exit the realmconfig tool do the same with the Quit button.

It's important to note that the cluster is optional. If your machine has a cluster record in the Hesiod database, you can leave the cluster option out, and the Hesiod database's cluster record will be used. To determine if your machine has a cluster record, you can use the command hes machinename, where machinename is the name of your machine. If you get output like the following

   CLUSTER: acl engr_sum1 engr_sum2 engr_sum twoplustwo dist_learning engrstaff ecostaff cccadm cc-staff
   CLUSTER: nacl disable nofee

then your machine has a cluster record in the Hesiod database. If not, you can still use clusters without getting this record added. You just need to specify a cluster record from the Hesiod database as the cluster argument.