LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 10-12-2005, 11:13 PM   #1
Elijah
Member
 
Registered: Feb 2003
Location: Philippines
Distribution: Debian, Mandrake, Redhat
Posts: 90

Rep: Reputation: 15
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:
localhost://home/USER/ <-- directory not found!
what I wanted is that each user should have their own home directory in the ldap+samba server itself each logon. And those directories should automatically create itself when it's the user's first logon.
$su USER
$cd ~/
$pwd
Quote:
server02://home/USER/ or
192.168.100.1://home/USER1 or
192.168.100.1://home/USER2
How should I do this?

I followed this howto btw:
http://tlug.dnho.net/?q=node/146#comment-145

Last edited by Elijah; 10-12-2005 at 11:14 PM.
 
Old 10-13-2005, 01:47 AM   #2
dhruvypatel
Member
 
Registered: Oct 2005
Location: Bangalore,India
Distribution: Debian
Posts: 37

Rep: Reputation: 15
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.
 
Old 10-13-2005, 02:33 AM   #3
Elijah
Member
 
Registered: Feb 2003
Location: Philippines
Distribution: Debian, Mandrake, Redhat
Posts: 90

Original Poster
Rep: Reputation: 15
but my /home is not partitioned and is part of root "/" ... will this umount/mount the entire root directory?
 
Old 10-13-2005, 02:42 AM   #4
dhruvypatel
Member
 
Registered: Oct 2005
Location: Bangalore,India
Distribution: Debian
Posts: 37

Rep: Reputation: 15
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.
 
Old 10-13-2005, 03:04 AM   #5
Elijah
Member
 
Registered: Feb 2003
Location: Philippines
Distribution: Debian, Mandrake, Redhat
Posts: 90

Original Poster
Rep: Reputation: 15
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?? 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.

Last edited by Elijah; 10-13-2005 at 03:10 AM.
 
Old 10-13-2005, 03:19 AM   #6
Elijah
Member
 
Registered: Feb 2003
Location: Philippines
Distribution: Debian, Mandrake, Redhat
Posts: 90

Original Poster
Rep: Reputation: 15
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:$
 
Old 10-14-2005, 12:21 AM   #7
dhruvypatel
Member
 
Registered: Oct 2005
Location: Bangalore,India
Distribution: Debian
Posts: 37

Rep: Reputation: 15
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.
 
Old 10-14-2005, 02:06 AM   #8
Elijah
Member
 
Registered: Feb 2003
Location: Philippines
Distribution: Debian, Mandrake, Redhat
Posts: 90

Original Poster
Rep: Reputation: 15
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
 
Old 10-14-2005, 06:28 AM   #9
Elijah
Member
 
Registered: Feb 2003
Location: Philippines
Distribution: Debian, Mandrake, Redhat
Posts: 90

Original Poster
Rep: Reputation: 15
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 ...
 
Old 10-14-2005, 06:29 AM   #10
Elijah
Member
 
Registered: Feb 2003
Location: Philippines
Distribution: Debian, Mandrake, Redhat
Posts: 90

Original Poster
Rep: Reputation: 15
got a working howto for autofs+samba+ldap?
 
Old 10-15-2005, 12:10 AM   #11
dhruvypatel
Member
 
Registered: Oct 2005
Location: Bangalore,India
Distribution: Debian
Posts: 37

Rep: Reputation: 15
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.
 
Old 10-20-2005, 09:29 PM   #12
Elijah
Member
 
Registered: Feb 2003
Location: Philippines
Distribution: Debian, Mandrake, Redhat
Posts: 90

Original Poster
Rep: Reputation: 15
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:
elijah@ubuntu:~$ su test
Password:
test@ubuntu:/home/elijah$ pwd
/home/elijah
test@ubuntu:/home/elijah$ cd
bash: cd: /home/test: No such file or directory
test@ubuntu:/home/elijah$
getting in from the server side:
Quote:
[root@server02 ~]# ls /home/
nolimel
[root@server02 ~]# mkdir /home/test
mkdir: cannot create directory `/home/test': File exists
[root@server02 ~]# ls /home/
nolimel test
[root@server02 ~]# su test
bash-3.00$ cd
bash-3.00$ pwd
/home/test
bash-3.00$
Well, it worked for the server ... but the client can't find mount it's own home directory 192.168.100.1:/home/& from the server ...

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?

Last edited by Elijah; 10-20-2005 at 09:32 PM.
 
Old 10-21-2005, 12:26 AM   #13
dhruvypatel
Member
 
Registered: Oct 2005
Location: Bangalore,India
Distribution: Debian
Posts: 37

Rep: Reputation: 15
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.
 
Old 10-21-2005, 02:35 AM   #14
Elijah
Member
 
Registered: Feb 2003
Location: Philippines
Distribution: Debian, Mandrake, Redhat
Posts: 90

Original Poster
Rep: Reputation: 15
I get:

No directory, logging in with HOME=/
 
Old 10-22-2005, 12:55 AM   #15
dhruvypatel
Member
 
Registered: Oct 2005
Location: Bangalore,India
Distribution: Debian
Posts: 37

Rep: Reputation: 15
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SAMBA - Roaming profiles not working - Help!! Paulsuk Linux - Software 2 07-31-2005 04:19 AM
samba pdc roaming profiles help chm0d Linux - Networking 1 04-19-2005 03:24 AM
samba, roaming profiles help. mehesque Linux - Networking 0 05-03-2004 09:07 PM
Samba roaming profiles absco Linux - Networking 1 08-25-2003 11:44 AM
samba pdc without roaming profiles 2 hsa Linux - General 4 05-13-2003 09:43 AM


All times are GMT -5. The time now is 02:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration