Thursday, January 15, 2009

Configure Ldap & NFS On Client Machine

### Ldap Configuration & NFS On Debian Etch & Ubuntu Linux ###

To install Ldap and NFS, Install the following packages as below:

aptitude search libpam-ldap libnss-ldap ------>(To search whether the application is present in repo).

aptitude install libpam-ldap libnss-ldap -----> (To Install the application)

While installation you will get the ldap server configuration setup wizard fill it up as below example:

Ldap Server Ip address

dc=domain,dc=ac,dc=in (your local network name)

cn=admin,ou=Apps,dc=domain,dc=ac,dc=in, passwd of your ldap server,and say 'NO' to other options...

after compleating ldap server configuration edit the following by using editor as a root:

1. /etc/pam_ldap.conf

change the host ip (ldap server ip)

base dc=domain,dc=ac,dc=in

rootbinddn cn=admin,ou=Apps,dc=domain,dc=ac,dc=in


2. /etc/libnss-ldap.conf

Change the host ip to ldap server ip

rootbinddn cn=admin,ou=Apps,dc=domain,dc=ac,dc=in

3. /etc/nsswitch.conf

passwd: files ldap
group: files ldap
shadow: files ldap
hosts: files dns mdns


4. cd /etc/pam.d

a. vi common-auth

auth sufficient pam_ldap.so
auth required pam_unix.so nullok_secure try_first_pass

b. vi common-account

account sufficient pam_ldap.so
account required pam_unix.so

c. vi common-password

password sufficient pam_ldap.so
password required pam_unix.so nullok obscure min=4 max=8 md5


d. vi commaom-session

session sufficient pam_ldap.so
session required pam_unix.so
session optional pam_foreground.so

To see the UID & PASSWD type as a root 'getent passwd' a list of uid & passwd will appear.. by this the Ldap configuration finishes...

If Your Unable To Find Ldap User, Run The Following Command :- (For Ubuntu 7.04 & 7.10)

After configuration these files create a group, 'sudo addgroup --system nvram'.After this you should be able to see username
and passwd of all users..


## Network File System Configuration ##

### Installation of nfs-common, portmap, autofs ####

aptitude install nfs-common, portmap, autofs

After installation edit the following files..

a. vi /etc/auto.master

/home /etc/auto.home

b. vi /etc/auto.home
* ( Ldap server ip address):/home/&


After editting these files reatsrt the service...


/etc/init.d/portmap restart

/etc/init.d/autofs restart

or

Reboot the machine, after rebooting you should be able to login to your account.

No comments: