LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-17-2012, 11:35 AM   #1
sunnysthakur
Member
 
Registered: Aug 2012
Posts: 92

Rep: Reputation: Disabled
Trouble assigning user to group in OpenLDAP


Hello,

I am working on setup LDAP Server and facing issue related to assigning user to a group. Below is the LDAP structure i am using.

I have created Users,Groups and Servers ou's and sub ou's added to the same [bugbase,ftp,samba,svn,tcms,wiki] or Users as well as Groups OU.

Logged in as: cn=Manager,dc=bebolabs,dc=net

+--> dc=bebolabs,dc=net (3)
+--> ou=Groups (6)
| ---> ou=bugbase
| ---> ou=ftp
| ---> ou=samba
| ---> ou=svn
| ---> ou=tcms
| ---> ou=wiki
---> ou=Systems
+--> ou=Users (6)
| ---> ou=bugbase
| ---> ou=ftp
| ---> ou=samba
| ---> ou=svn
| ---> ou=tcms
| ---> ou=wiki

Now i created a user under Users->FTP->username ou and group created under Groups->FTP->groupname ou.

I assigned username under Users->FTP to group under Groups->FTP.

But on login from client machine below error is throwing and user is n

[root@ldapclnt ~]# su - sunny
id: cannot find name for group ID 500
[sunny@ldapclnt ~]$ id
uid=500(sunny) gid=500 groups=500
[sunny@ldapclnt ~]$


Please help me on this how to fix this.

Below is my ldapgroup.ldif and ldapuser.ldif

ldapgroup.ldif
dn: cn=sunny,ou=ftp,ou=Groups,dc=bebolabs,dc=net
objectClass: posixGroup
cn: sunny
gidNumber: 500
memberuid: sunny

ldapuser.ldif

dn: uid=sunny,ou=ftp,ou=Users,dc=bebolabs,dc=net
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
uid: sunny
sn: sunny
givenName: sunny
cn: sunny
displayName: sunny
uidNumber: 500
gidNumber: 500
userPassword: {crypt}$1$tayZSy59$DcPHe6xQC3IvlNLE5u1ix1
gecos: sunny
loginShell: /bin/bash
homeDirectory: /home/sunny
shadowExpire: -1
shadowFlag: 0
shadowWarning: 7
shadowMin: 0
shadowMax: 99999
shadowLastChange: 15240
 
Old 09-18-2012, 02:39 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
so what's this group stuff about? Why have you created the "sunny" group inside the ftp ou? Isn't ftp the group they should be a member of? Compare and contrast the group config for a working group.
 
Old 09-18-2012, 03:46 AM   #3
sunnysthakur
Member
 
Registered: Aug 2012
Posts: 92

Original Poster
Rep: Reputation: Disabled
What i am doing is to create a different ou's for different servers [FTP,samba,svn etc...] so that the users and groups which are under FTP ou will be access to FTP server [which will be ldap client and so on for other servers also]

What i did i created ou's under Groups and Users so that user under FTP ou should have group under Groups->FTP.

This what i am trying to do...

Can you please help me on this if this possible scenario.
 
Old 09-18-2012, 03:53 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
right so again, compare these things. What is the config for pulling the ldap groups? Presumably there is no entry for this group when you run "getent group"? Focus on just getting that working and go from there.
 
Old 09-18-2012, 07:02 AM   #5
sunnysthakur
Member
 
Registered: Aug 2012
Posts: 92

Original Poster
Rep: Reputation: Disabled
When i use base DN on client machine as ou=ftp,ou=Groups,dc=bebolabs,dc=net then it shows groups using getent group but not user list in passwd
and when i use ou=ftp,ou=users,dc=bebolabs,dc=net then its shows user list using getent passwd but not group.

Is this mean that i have to use multiple base DN on client side, if yes then how can i use this.
 
Old 09-18-2012, 07:18 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
right so presuming your configuring in nss_ldap you'll have nss_ldap_group and nss_ldap_passwd attributes to set to each DN respectively.
 
Old 09-18-2012, 02:33 PM   #7
sunnysthakur
Member
 
Registered: Aug 2012
Posts: 92

Original Poster
Rep: Reputation: Disabled
Acid,

Currently i am using pam_ldap instead of nss_ldap.
As per you, to call multiple Base DN i need to configure nss_ldap with LDAP server instead of pam_ldap
 
Old 09-18-2012, 02:35 PM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
pam and nss work independently. pam does the authentication, nss does the user information lookups.
 
  


Reply



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
Trouble setting up User Private Group(UPG) in RHEL5 Metropolis Linux - General 13 06-30-2009 05:00 PM
Trouble assigning permissions staph Linux - Newbie 8 02-05-2007 07:00 PM
Trouble assigning value to variable with fatsheep Programming 1 11-07-2006 07:44 PM
Add /etc/group to openldap leiw Linux - General 0 11-03-2006 03:46 AM
Problem assigning new user to my group Odyssey1942 Linux - Newbie 30 08-24-2006 02:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:54 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
Open Source Consulting | Domain Registration