ttc(1)

NAME
ttc - Terminal Type Control

SYNOPSIS
ttc [-d <any terminal type> ... ] [-t <any terminal type> ... ] [-f filename ] [-hV ]

Terminal type can be for example: /dev/tty* | /dev/pts* | /dev/pty*

DESCRIPTION

Ttc - Terminal Type Control -program, controls the logins on those terminal types, given as argument for the ttc. You can deny any terminal type you want and/or you can set timing for any terminal type you want.

Ttc is very handy when, for example, we want to deny logins from console except for some users, like root and administrators. Deny option has authorization check and if user passes it, user is able to login that terminal type what was marked as denied. If user fails authentication, session will be killed.

Other very useful option is timing. Using this option you can set timing to any tty you want to. This is very handy for example with serial lines. When users time is up, session will be killed. Timing option also has authorization check. If user passes it, user will have no time limit. If user fails authentication, default time limit is set for user. Timing process is handled by ttc daemon program - ttcd(8).

Timing has also a time bank system. This means that user can have for example 60 minutes time limit, for one day. If user uses all time limit, he/she won't be able to login again during that day. At 00:00 all time limit files will be removed and user is able to login again. User can use the time limit in so many parts he/she wants during the day.

Time bank system can be disabled, when user has normal time limit but after time is up user is still able to login back again.

With ttc you can also control users logons on timed terminal types. This means that if login limit is given, user is able to logon during that day, that many times defined in login limit. After user has used his/her login limit, user is not able to logon again. Login limit is combined with time bank system, so when time limit files is removed, login limits are set back up again.

Another feature is deny access option. You can deny some specific user to logon to some specific tty(s). This option should be used very carefully. More about this later.

OPTIONS
Options for ttc are given on the command line like next:

    # ttc -d /dev/tty1 /dev/tty2 /dev/tty3 -t /dev/ttyS1 /dev/ttyS2

This would deny terminal types tty1..3 and would set timing to two first serial lines, ttyS1 and ttyS2. As you can see, you can set any tty you want and as many as you want to. You can also use wildcards when defining tty's.

-d ttylist
    Deny tty's (eg. -d /dev/tty1 /dev/ttyS1 ...)

-t ttylist
    timing for tty's (eg. -t /dev/ttyS3, /dev/ttyS1 ...)

-f filename
    read options from file (default: /etc/ttc.options)

-h  Displays help

-V  Displays current version

Other way to give options is to create options file. By default, if you run ttc _without any options_, ttc reads /etc/ttc.options file for options. By using -f option you can order ttc to read what ever options file you want.

Options file could be like next:

    # example ttc options file
    # denied tty's
    -d /dev/tty3 /dev/tty5
    # timed tty's
    -t /dev/ttyS1 /dev/ttyS2

This would set deny to tty3 and tty5 and timing for ttyS1 and ttyS2. You can replace -d option with keyword deny and -t option with keyword timing , respectively. Wildcard's can be used when defining tty's. Lines starting with # are ignored.

CONFIGURATION FILES
Ttc is quite configurable. All configurations for ttc are done by default in /etc/ttc.config -file. (This configuration file replaces old ttc.timing, ttc.deny, ttc.notimebank and ttc.logcount files)

Configuration file consists of three (3) different sections:

    <TimingAuth> Format: +username:timelimit:notimebank:loginlimit
    <DenyAuth> Format: +username
    <DenyAccess> Format: +username:ttylist

TimingAuth -section:
    Name in this section will give user no time limit at all or some other time limit (smaller perhaps than for others) than other users. You can also define if user has time bank or not. Login limits can be defined here too. Keyword ALL can replace username in upper format.

    Examples:

    <TimingAuth>
    +priikone:::
    +kansanen:30:notimebank:
    +giselak:50::10
    +ALL:60::5

    This means that user 'priikone' has no time limit at all. User 'kansanen' has 30 minute time limit but no time bank system. User 'giselak' has 50 minute time limit and can logon 10 times during the day. And last, all users (except user defined above keyword ALL ) has 60 minute time limit and can logon 5 times during the day.

    Keyword ALL is optional and if it is not given, default time limit is used for all other users not defined in this section.

DenyAuth -section:
    Name in this section will give user access to that tty which was marked as denied. Keyword ALL can be used here as well.

    Examples:

    <DenyAuth>
    +root
    +priikone
    +giselak

    This means that users 'root', 'priikone' and 'giselak' can login on those tty's which was marked as denied. It is always a good idea to include user

DenyAccess -section:
    Name in this section will deny to that user to be able to logon specified tty(s). This section should not be used unless specifically needed to for example deny for some specific user not to be able to logon to some tty (like for example to modem lines).

    For safety reasons keyword ALL _cannot_ be used here! Also, never define user 'root' here unless you know what you're doing!

    This section is always in use, so you don't have to define any option in options file in order to use this. This section is disabled when no usernames is defined here.

    Examples:

    <DenyAccess>
    +doejohn:/dev/ttyS* /dev/tty1
    +kyheroin:

    This means that user 'doejohn' is denied to logon all /dev/ttyS tty's and /dev/tty1. User 'kyheroin' is denied to logon any tty. Ttylist is always seperated by whitespaces, and wildcards can be used when defining tty names.

AFTER INSTALLATION
There are some tasks you have to do right after installation of ttc and ttcd. I suggest to read ttcd(8) manual page also.

In order to get ttc check denied and timed tty's every time a user logs in, is to place it in a file which is read on every login. if you use bash, this file would be /etc/profile, on the other hand, if you use tcsh, this file would be /etc/csh.cshrc. Or any other you might think of - it doesn't matter as long as ttc will be executed on every login.

FILES

/etc/ttc.config
    Ttc configuration file.

/etc/ttc.options
    Ttc options file.

BUGS
None known. Please report if you find a bug.

AUTHOR
Pekka Riikonen (priikone@poseidon.pspt.fi)

SEE ALSO

ttcd(8)