The text of a manual · part 29 of 49
Cyclades-TS User Guide: Chapter 3 - Additional Features, pages 277 to 286
Pages 277 to 286 of 454, from Cyclades-TS User Guide
The original document is the PDF (4.3 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Cyclades TS2000 and Avocent TS2000
Page 277
Chapter 3 - Additional Features pam_access
Provides logdaemon style login access control.
pam_deny
Deny access to all users.
pam_env
This module allows the (un)setting of environment variables. The use of previously set environment variables as well as PAM_ITEMs such as PAM_RHOST is supported.
pam_filter
This module was written to offer a plug-in alternative to programs like ttysnoop (XXX - need a reference). Since a filter that performs this function has not been written, it is currently only a toy. The single filter provided with the module simply transposes upper and lower case letters in the input and output streams. (This can be very annoying and is not kind to termcap-based editors.)
pam_group
This module provides group settings based on the user’s name and the terminal they are requesting a given service from. It takes note of the time of day.
pam_issue
This module presents the issue file (/etc/issue by default) when prompting for a username.
pam_lastlog
This session module maintains the /var/log/lastlog file. It adds an open entry when called via the pam_open_session()function and completes it when pam_close_session() is called. This module can also display a line of information about the last login of the user. If an application already performs these tasks, it is not necessary to use this module.
pam_limits
This module, through the Linux-PAM open-session hook, sets limits on the system resources that can be obtained in a user session. Its actions are dictated more explicitly through the configuration file discussed in /etc/security/pam_limits.conf.
pam_listfile
The listfile module provides a way to deny or allow services based on an arbitrary file.
pam_motd
This module outputs the motd file (/etc/motd by default) upon successful login.
pam_nologin
Provides standard Unix nologin authentication.
User Guide
277
Page 278
Linux-PAM pam_permit
This module should be used with extreme caution. Its action is to always permit access. It does nothing else.
pam_radius
Provides Radius server authentication and accounting.
pam_rootok
This module is for use in situations where the superuser wishes to gain access to a service without having to enter a password.
pam_securetty
Provides standard UNIX securetty checking.
pam_time
Running a well-regulated system occasionally involves restricting access to certain services in a selective manner. This module offers some time control for access to services offered by a system. Its actions are determined with a configuration file. This module can be configured to deny access to (individual) users based on their name, the time of day, the day of week, the service they are applying for and their terminal from which they are making their request.
pam_tacplus
Provides TacacsPlus Server authentication, authorization (account management), and accounting (session management).
pam_unix
This is the standard UNIX authentication module. It uses standard calls from the system’s libraries to retrieve and set account information as well as authentication. Usually this is obtained from the etc/passwd and the /etc/shadow file as well when shadow is enabled.
pam_warn
This module is principally for logging information about a proposed authentication or application to update a password.
278
Cyclades-TS
Page 279
Chapter 3 - Additional Features pam_ldap
Pam_ldap looks for the ldap client configuration file “ldap.conf” in /etc/. Here's an example of the ldap.conf file (partial): # file name: ldap.conf # This is the configuration file for the LDAP nameservice # switch library and the LDAP PAM module. # # Your LDAP server. Must be resolvable without using LDAP. host 127.0.0.1 # The distinguished name of the search base. base dc=padl,dc=com
Arguments The arguments are a list of tokens that are passed to the module when it is invoked. They are much like arguments to a typical Linux shell command. Generally, valid arguments are optional and are specific to any given module. Invalid arguments are ignored by a module, however, when encountering an invalid argument, the module is required to write an error to syslog(3). The following are optional arguments which are likely to be understood by any module. Arguments (including these) are in general, optional. debug
Use the syslog(3) call to log debugging information to the system log files.
no_warn
Instruct module to not give warning messages to the application.
use_first_pass
The module should not prompt the user for a password. Instead, it should obtain the previously typed password (from the preceding auth module), and use that. If that doesn’t work, then the user will not be authenticated. (This option is intended for auth and password modules only).
User Guide
279
Page 280
Linux-PAM try_first_pass
The module should attempt authentication with the previously typed password (from the preceding auth module). If that doesn’t work, then the user is prompted for a password. (This option is intended for auth modules only).
use_mapped_ pass
This argument is not currently supported by any of the modules in the Linux-PAM distribution because of possible consequences associated with U.S. encryption exporting restrictions.
expose_account
In general, the leakage of some information about user accounts is not a secure policy for modules to adopt. Sometimes information such as user names or home directories, or preferred shell, can be used to attack a user’s account. In some circumstances, however, this sort of information is not deemed a threat: displaying a user’s full name when asking them for a password in a secured environment could- also be called being ‘friendly’. The expose_account argument is a standard module argument to encourage a module to be less discrete about account information as deemed appropriate by the local administrator. Any line in (one of) the configuration file(s), that is not formatted correctly will generally tend (erring on the side of caution) to make the authentication process fail. A corresponding error is written to the system log files with a call to syslog(3).
280
Cyclades-TS
Page 281
Chapter 3 - Additional Features LDAP Authentication LDAP server for Linux Step 1: The RPMs required for the LDAP servers are: • db (Sleepycat Berkeley Database) • openssl (OpenSSL) • openldap (OpenLDAP) It's possible also to load the source codes and compile them, but it is easier to load these RPMs from the RedHat CDs. Step 2: Go to the directory /etc/openldap or /usr/local/etc/openldap. NOTE: the example uses /usr/local path. Change all references of /usr/local if the path is different, and check if the directory/file really exists. cd /usr/local/etc/openldap Step 3: Create the certificates: ln -s /usr/local/bin/openssl . ln -s /usr/local/ssl/misc/CA.pl . PATH=$PATH:. CA.pl -newca <-- anwer questions, you MUST fill in "commonName" CA.pl -newreq <-- repeat CA.pl -signreq mv newreq.pem ldapkey.pem chmod 0600 ldapkey.pem mv newcert.pem ldapcert.pem
User Guide
281
Page 282
LDAP Authentication Step 4: Edit slapd.conf. The basic configuration to make it work is: include /usr/local/etc/openldap/schema/core.schema include /usr/local/etc/openldap/schema/cosine.schema pidfile /usr/local/var/slapd.pid argsfile /usr/local/var/slapd.args
TLSCipherSuite HIGH:MEDIUM:+SSLv2 TLSCertificateFile /usr/local/etc/openldap/ldapcert.pem TLSCertificateKeyFile /usr/local/etc/openldap/ldapkey.pem TLSCACertificateFile /usr/local/etc/openldap/demoCA/cacert.pem database bdb suffix "dc=cyclades,dc=com,dc=br" rootdn "cn=admin,dc=cyclades,dc=com,dc=br" rootpw bitadmin directory /usr/local/var/openldap-data index objectClass eq Step 5: Start LDAP server. This is done by the command: /usr/local/libexec/slapd -h "ldap:/// ldaps:///" This will allow the LDAP server accept both secured mode and non-secure mode.
282
Cyclades-TS
Page 283
Chapter 3 - Additional Features Step 6: Add entries. Example: ldapadd -x -D "cn=admin,dc=cyclades,dc=com,dc=br" -w bitadmin dn: uid=cyuser,dc=cyclades,dc=com,dc=br objectClass: person objectClass: uidobject uid: cyuser cn: Cyclades User sn: Fujimoto userPassword: bituser To list the entries: ldapsearch -x -D "cn=admin,dc=cyclades,dc=com,dc=br" -w bitadmin '(objectClass=*)' This is enough to set up a LDAP server with some users, for PAM authentication purposes. In order to configure the TS: Step 1: Configure all.protocol as ldap, in /etc/portslave/pslave.conf Step 2: Edit /etc/ldap.conf. Edit the following parameters:
host 200.246.93.95 <== LDAP server IP address or name base dc=cyclades,dc=com,dc=br <== distinguished name of the search base uri ldaps://200.246.93.95 <== to use secure LDAP
User Guide
283
Page 284
LDAP Authentication For Active Directory A Windows 2000 or Windows 2003 Server edition is necessary. In the Cyclades-TS side, the / etc/ldap.conf file must be configured. .
What needs to be set in the /etc/ldap.conf # The Windows 2003 server IP address host 200.246.93.118
# The Distinguished name (In our active directory, the format was set # to cyclades.local) base dc=CycladesCorporation,dc=local
# Here you can insert any user you had created, or the administrator user. I set # the administrator user. I could not make the AD accept anonymous users to # bind. binddn cn=Administrator,cn=Users,dc=CycladesCorporation,dc=local
# Password for that user bindpw Teste123
# PAM login attribute pam_login_attribute sAMAccountName
# Update Active Directory password, by # creating Unicode password and updating # unicodePwd attribute. pam_password ad
284
Cyclades-TS
Page 285
Chapter 3 - Additional Features Default Policy If a system is to be considered secure, it had better have a reasonably secure ‘OTHER’ entry. The following is a “severe” setting (which is not a bad place to start!): # # default; deny access # OTHER auth required pam_deny.so OTHER account required pam_deny.so OTHER password required pam_deny.so OTHER session required pam_deny.so While fundamentally a secure default, this is not very sympathetic to a misconfigured system. For example, such a system is vulnerable to locking everyone out should the rest of the file become badly written. The module pam_deny not very sophisticated. For example, it logs no information when it is invoked, so unless the users of a system contact the administrator when failing to execute a service application, the administrator may not know for a long while that his system is misconfigured. The addition of the following line before those in the above example would provide a suitable warning to the administrator. # # default; This application is not configured # OTHER auth required pam_warn.so OTHER password required pam_warn.so Having two “OTHER auth” lines is an example of stacking.
User Guide
285
Page 286
LDAP Authentication On a less sensitive computer, the following selection of lines (in /etc/pam.conf) is likely to mimic the historically familiar Linux setup: # # default; standard UNIX access # OTHER auth required pam_unix_auth.so OTHER account required pam_unix_acct.so OTHER password required pam_unix_passwd.so OTHER session required pam_unix_session.so In general this will provide a starting place for most applications. In addition to the normal applications: login, su, sshd, passwd, and pppd. Cyclades also has made portslave a PAM-aware application. The portslave requires four services configured in pam.conf. They are local, remote, radius, and tacplus. The portslave PAM interface takes any parameter needed to perform the authentication in the serial ports from the file pslave.conf. The pslave.conf parameter all.authtype determines which service(s) should be used. # ---------------------------------------------------------------------------# # /etc/pam.conf
#
#
#
# Last modified by Andrew G. Morgan <morgan@kernel.org>
#
# ---------------------------------------------------------------------------# # $Id: pam.conf,v 1.9 2003/06/12 20:34:13 regina Exp $ # ---------------------------------------------------------------------------# # serv.module # nametype ctrl module [path]...[args..]
# flag
#
# ---------------------------------------------------------------------------#
# WARNING. The services tacacs, s_tacacs, radius, s_radius, local, s_local, # and remote are used by the Cyclades applications portslave,
# socket_server, socket_ssh, and raw_data and should not be changed
286
Cyclades-TS