LDAPAccountManager/lam/docs/README.lamdaemon.txt

107 lines
3.1 KiB
Plaintext
Raw Normal View History

2006-08-27 14:57:50 +00:00
This document describes the installation of lamdaemon which is responsible
for managing quotas and creating home directories.
2005-07-06 11:07:53 +00:00
2006-08-27 14:57:50 +00:00
Attention! The old version of lamdaemon is no longer supported. However,
if you do not install libssh2 then LAM will fall back to the old mechanismn.
If you want to stay with the old lamdaemon then change your /etc/sudoers entries
to point to lamdaemonOld.pl.
Setting up lamdaemon:
=====================
2005-07-06 11:07:53 +00:00
Lamdaemon.pl is used to modify quota and home directories on a remote or local host via ssh.
If you want wo use it you have to set up some things to get it to work:
1. Setup values in LDAP Account Manager
2006-08-27 14:57:50 +00:00
=======================================
* Set the remote or local host in the configuration
(e.g. 127.0.0.1)
* Path to lamdaemon.pl, e.g. /srv/www/htdocs/lam/lib/lamdaemon.pl
2006-07-20 19:21:56 +00:00
If you installed a Debian or RPM package then the script may be located at
/usr/share/ldap-account-manager/lib or /var/www/html/lam/lib.
2006-08-27 14:57:50 +00:00
2. Setup sudo
=============
The perl script has to run as root. Therefore we need
a wrapper, sudo.
Edit /etc/sudoers on host where homedirs or quotas should be used
and add the following line:
2006-08-27 14:57:50 +00:00
$admin All= NOPASSWD: $path
2005-07-06 11:07:53 +00:00
2006-08-27 14:57:50 +00:00
$admin is the admin user from LAM (must be a valid Unix account)
and $path is the path to lamdaemon.pl
2006-08-27 14:57:50 +00:00
e.g.: myAdmin All= NOPASSWD: /srv/www/htdocs/lam/lib/lamdaemon.pl
2004-05-26 17:17:44 +00:00
2006-08-27 14:57:50 +00:00
3. Setup Perl
==============
We need an extra Perl module - Quota
To install it, run:
2004-05-26 17:17:44 +00:00
perl -MCPAN -e shell
2006-08-27 14:57:50 +00:00
install Quota
2004-05-26 17:17:44 +00:00
If your Perl executable is not located in /usr/bin/perl you will have to edit
the path in the first line of lamdaemon.pl.
2005-12-17 12:19:20 +00:00
If you have problems compiling the Perl modules try installing a newer release
of your GCC compiler and the "make" application.
2004-05-26 17:17:44 +00:00
2006-08-27 14:57:50 +00:00
Several Linux distributions already include a quota package for Perl.
2004-05-26 17:17:44 +00:00
2006-08-27 14:57:50 +00:00
4. Install libssh2
==================
2005-07-06 11:07:53 +00:00
2006-08-27 14:57:50 +00:00
4.1 Install libssh2
You can get libssh2 here: http://www.libssh2.org
Unpack the package and install it by executing the commands
"./configure", "make" and "make install" in the extracted directory.
2005-07-06 11:07:53 +00:00
2006-08-27 14:57:50 +00:00
4.2 Install SSH2 for PHP
The easiest way is to run "pecl install ssh2-beta". If you have no pecl command then install
the PHP Pear package (e.g. php-pear or php5-pear) for your distribution.
2004-05-26 17:17:44 +00:00
2006-08-27 14:57:50 +00:00
If you want to compile it yourself, get the sources here: http://pecl.php.net/package/ssh2
2004-05-26 17:17:44 +00:00
2006-08-27 14:57:50 +00:00
5. Set up SSH
=============
2006-08-27 14:57:50 +00:00
Your SSH daemon must offer the password authentication method.
To activate it just use this configuration option in /etc/ssh/sshd_config:
2006-08-27 14:57:50 +00:00
PasswordAuthentication yes
2004-05-26 17:17:44 +00:00
2006-08-27 14:57:50 +00:00
Now everything should work fine.
2005-07-06 11:07:53 +00:00
6. Debugging lamdaemon
2006-08-27 14:57:50 +00:00
======================
2005-07-06 11:07:53 +00:00
- Check /var/log/auth.log or the equivalent on your system
This file contains messages about all logins. If the ssh login
failed then you will find a description about the reason here.
- Set sshd in debug mode
In /etc/ssh/sshd_conf add these lines:
SyslogFacility AUTH
LogLevel DEBUG3
Now check /var/log/syslog for messages from sshd.
2005-07-06 11:07:53 +00:00
- Update Openssh
A Suse Linux user reported that upgrading Openssh solved the problem.