LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 09-03-2012, 01:37 AM   #1
skimeer
Member
 
Registered: Jun 2007
Posts: 55
Blog Entries: 1

Rep: Reputation: 0
Adding users to multiple groups in Openldap


Hi,

I need to modify user properties to add them in multiple groups. I have modified GID of user to make it the member of particular group. Not sure if this fine but its working for me.

But want to know that how to add one user in multiple groups.

This is my ldif file,

dn: uid=testoprldap,dc=test,dc=com
uid: testoprldap
cn: testoprldap
objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
objectClass: organizationRole
objectClass: UserMail
userPassword: {crypt}$1$OaJH.Q.E$oGqx0aMeL9Z1NE1w7kmM//
shadowLastChange: 15581
shadowMin: 0
shadowMax: 99999
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 10115
gidNumber: 10001
role: ldap-operator
usermail: testoprldap@testoprldap.com
homeDirectory: /home/testoprldap
 
Old 09-03-2012, 02:36 AM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,143

Rep: Reputation: 322Reputation: 322Reputation: 322Reputation: 322
What you need to do to put a user in multiple groups is to modify the LDAP entries of the secondary grouo(s) and add a memberUid field with the user's name. This is morally the same as adding the user to the group by editing the entry in /etc/groups on a non-LDAP system.

In short, you caan only change the primary GID by editing the user's DN. To modify the secondary group entries, you need to modify the DNs of the affected group(s).
 
  


Reply

Tags
group, openldap


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
several questions about ldap (adding new groups/users/etc) ncsuapex Linux - Server 9 05-26-2009 01:23 PM
adding multiple groups in a single user guy_ripper Linux - Newbie 1 12-04-2007 10:34 PM
Creating groups and adding users to that group tehfatal Linux - Newbie 2 04-01-2007 01:42 AM
adding users to groups in with in console binary1011100 Linux - Newbie 3 11-18-2006 03:15 PM
creating groups, adding users, and setting permissions bowie101 Linux - Newbie 2 11-23-2005 01:42 PM


All times are GMT -5. The time now is 09:33 AM.

Main Menu
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