Roaming Profiles via LDAP, Samba, Lam ... Help!
I managed to get Openldap work in our fedora3, then LAM, Samba looks ok ...
I could authenticate as a different user via ldap but their home directories are stored locally(whichever pc I logged on) ... $su USER $cd ~/ Quote:
$su USER $cd ~/ $pwd Quote:
I followed this howto btw: http://tlug.dnho.net/?q=node/146#comment-145 |
Hi,
For automatically creating user's home directory you need to setup automount. You can setup automount using /etc/auto.master. In that file write a line as below. /home /etc/auto.misc --timeout=60 Then add one line in /etc/auto.misc as below. * rw,soft,intr ldapserver:/home/& I don't remember the exact portion of permission parts. If any mistake is there then you can see it in comment line of /etc/auto.mis. Then restart the autofs service and you have done. NOTE: You r doing automount on /home directory which is already mounted. So before doing this you have to unmount it. But doing so will effect local users. So what you can do is change the home directory of ldap users to /home/ldap/USER. If you are automountin this way then you need not to umont the /home directory. Only you need to change the /home in auto.master file to /home/ldap. I hope you are clear about what I am saying. This will solve your problem. |
but my /home is not partitioned and is part of root "/" ... will this umount/mount the entire root directory? :eek:
|
Then it is not mounted right? what you can do is just use mount command to show which drives are mounted on which directory? if it is not showing /home entry then no need to unmount just do automount.
|
Okies, i setup autofs & restarted smb, ldap & autofs.
I created another user named 'last' and tried to login to another pc within the network: elijah@ubuntu:~$ su last Password: last@ubuntu:/home/elijah$ pwd /home/elijah last@ubuntu:/home/elijah$ cd bash: cd: /home/ldap/last: No such file or directory Logging on as user 'last' to the main server: [root@server02 ~]# su last bash-3.00$ ls bash-3.00$ pwd /root bash-3.00$ cd bash-3.00$ ls typing 'ls' in the home directory of 'last' froze the server ... what happened?? :confused: I had to reboot and try again, then it froze as I try to list down the contents of /home/ldap/last/ ... weird. The logging in for other pc's sets the ldap user to use the home directory of the local pc... instead of the server's. :( |
can I use something like mounting nfs shares automatically?
each time a user logs on one of the machines, the client connects to the main ldap/samba/nfs server & mounts an nfs share based on who the user is ... is there an app that does just that? localuser@localhost$ su ldapuser Password: ****** (client automatically gets a mounted /home/ldapuser nfs share from the server) ldapuser@localhost:$ |
Hey you have to create autofs entries on the each client machines from where you want to login. So do one thing remove autofs entries from the server and setup it on client side.
|
So I should put in the lines:
auto.master: /home/ldap /etc/auto.misc --timeout=60 auto.misc * rw,soft,intr 192.168.100.1:/home/ldap/& for each client then? ok, I'll try that later after work ... the server I'm working on is actually our development server, I don't want to freeze it again while testing autofs :D |
I did the following:
elijah@ubuntu:~$ sudo /etc/init.d/nscd restart Stopping Name Service Cache Daemon: nscd. Starting Name Service Cache Daemon: nscd. elijah@ubuntu:~$ sudo /etc/init.d/autofs restart Stopping automounter: Stopped 16080 done. Starting automounter: /home/ldap. elijah@ubuntu:~$ su test Password: test@ubuntu:/home/elijah$ cd bash: cd: /home/ldap/test: No such file or directory I'm afraid it didn't work ... :( |
got a working howto for autofs+samba+ldap?
|
You may put wrong entries in auto.master and auto.misc. Now what you can do is just login with the ldap user and see the error. Which directory is it showing? For example if it is showing /home/USER is not found then you probably put the entries like below assuming that at server side you have the /home/USER as home dirctory.
auto.master /home /etc/auto.misc --timeout=60 auto.misc * -rw,soft,intr 192.168.100.1:/home/& If server side you have home directory different than /home/USER say /home/ldap/USER then you have to change auto.misc entry as below. * -rw,soft,intr 192.168.100.1:/home/ldap/& The auto.master entry will remain the same. It may be different depending on client side entry. For example if you get error like /home/ldap/USER directory not found then you have to replace /home with /home/ldap. NOTE: Remember one thing the dirctory entry which is in the auto.master file must be exist on the system. If it is not exist then manually create it. |
I've changed the entries:
SERVER side: (auto.master) /home /etc/auto.misc --timeout=60 SERVER side: (auto.misc) * rw,soft,intr 192.168.100.1:/home/& CLIENT side: (auto.master) /home /etc/auto.misc --timeout=60 CLIENT side: (auto.misc) * rw,soft,intr 192.168.100.1:/home/& I try to get in from the client side: Quote:
Quote:
I use lam (ldap account manager) to create & edit user ldap+samba entries ... the test user's unix home directory is set to /home/test , the samba3 home path is set to nothing " " ... maybe that could be the problem? :scratch: |
Hi,
Don't try to login by su. Login direct in to terminal. and send me the exact error you are getting. I'll send exact entries for auto.master and auto.misc. |
I get:
No directory, logging in with HOME=/ |
This error seems new to me. Any way assuming /home/USER is your home directory at server and client side both.
Client side entries: auto.master: /home /etc/auto.misc --timeout=60 auto.misc: * -rw,soft,intr 192.168.100.1:/home/& At server side comment out all entries in auto.master and auto.misc. There is no need to implement autofs at server side. At server side you need to implement only NFS for the entry in auto.misc. AT SERVER SIDE: /etc/exports file: /home *(rw,sync) Then start nfs service. #exportfs -a #service nfs restart Now you have done. Check out and tell me what happend? |
All times are GMT -5. The time now is 04:06 AM. |