How to set upp ldap and nfs to an ebox server. For ldap users and files:
THE EBOX SERVER HAS THE IP 192.168.0.3 THE SEARCH BASE IS dc=ebox
To get this to work you have to change this to match your system:
apt-get install libpam-ldap libnss-ldap nss-updatedb libnss-db nfs-common ldap-utils
On the questions enter this:
LDAP server Uniform Resource Identifier: ldap://192.168.0.3 <- it's important it says ldap://<ip-address> Distinguished name of the search base: dc=ebox ldap://ldap.example.com 3 Make local root Database admin: No Does the LDAP database require login? No
Open file:
/etc/ldap.conf
Make sure it says:
bind_policy soft host 192.168.0.3 uri ldap://192.168.0.3
And after this, at the bottom:
nss_base_passwd ou=Users,dc=ebox?one nss_base_passwd ou=Computers,dc=ebox?one nss_base_shadow ou=Users,dc=ebox?one nss_base_group ou=Groups,dc=ebox?one
Open this file:
/etc/ldap/ldap.conf
It should look like this:
BASE dc=ebox URI ldap://192.168.0.3 SIZELIMIT 0 TIMELIMIT 0 DEREF never
Then run these commands:
sudo auth-client-config -t nss -p lac_ldap sudo pam-auth-update
Test so that it works:
getent passwd
You should now see your ldap users
Time for nfs and home folders. Create folders:
/home/samba/users
Then open file:
/etc/fstab
And add this line att buttom:
192.168.0.3:/home/samba/users /home/samba/users nfs rw,hard,intr,rsize=8192,wsize=8192,bg 0 0
Activate the mount:
mount /home/samba/users
Ubuntu 10.04 has something wrong with the ldap and pam module. So ldap users can login if you do not remove all lines and only have these lines activated in the files below:
sudo nano /etc/pam.d/common-account
account sufficient pam_ldap.so account required pam_unix.so
sudo nano /etc/pam.d/common-auth
auth sufficient pam_ldap.so auth required pam_unix.so nullok_secure use_first_pass
sudo nano /etc/pam.d/common-password
password sufficient pam_ldap.so password required pam_unix.so nullok obscure min=4 max=8 md5
time to reboot and use ubuntu with ebox:
reboot