System Administration Guide, Volume 2

How to Create a Dial-up Password


Caution - Caution -

When you first establish a dial-up password, be sure to remain logged in on at least one terminal while testing the password on a different terminal. If you make a mistake while installing the extra password and log off to test the new password, you might not be able to log back on. If you are still logged in on another terminal, you can go back and fix your mistake.


  1. Become superuser.

  2. Create an /etc/dialups file containing a list of terminal devices, including all the ports that will require dial-up password protection.

    The /etc/dialups file should look like this:

    /dev/term/a

    /dev/term/b

    /dev/term/c

  3. Create an /etc/d_passwd file containing the login programs that will require a dial-up password, and the encrypted dial-up password.

    Include shell programs that a user could be running at login, for example, uucico, sh, ksh, and csh. The /etc/d_passwd file should look like this:

    /usr/lib/uucp/uucico:encrypted_password:

    /usr/bin/csh:encrypted_password:

    /usr/bin/ksh:encrypted_password:

    /usr/bin/sh:encrypted_password:

  4. Set ownership to root on the two files.


    # chown root /etc/dialups /etc/d_passwd
    
  5. Set group ownership to root on the two files.


    # chgrp root /etc/dialups /etc/d_passwd
    
  6. Set read and write permissions for root on the two files.


    # chmod 600 /etc/dialups /etc/d_passwd
    
  7. Create the encrypted passwords.

    1. Create a temporary user.


      # useradd user-name
      
    2. Create a password for the temporary user.


      # passwd user-name
      
    3. Capture the encrypted password.


      # grep user-name /etc/shadow > user-name.temp
      
    4. Edit the user-name.temp file.

      Delete all fields except the encrypted password (the second field).

      For example, in the following line, the encrypted password is U9gp9SyA/JlSk.


      temp:U9gp9SyA/JlSk:7967:::::7988:
    5. Delete the temporary user.


      # userdel user-name
      
  8. Copy the encrypted password from user-name.temp file into the /etc/d_passwd file.

    You can create a different password for each login shell, or use the same one for each.