Sponsored Content
Full Discussion: how to use ldapadd
Top Forums UNIX for Dummies Questions & Answers how to use ldapadd Post 302496758 by jalite19 on Tuesday 15th of February 2011 07:34:19 AM
Old 02-15-2011
how to use ldapadd

We have netgroup in ldap in Sun java directory server, how can I add or remove a user to/from a netgroup via command line without using ldif file? I need to put this into a script.
Here is a sample netgroup, and I want to add user tonyz to it:
Code:
# ldapsearch  -h ldapserver.com -p 389 -b  "ou=netgroup,dc=ldapserver,dc=com" cn=SudoGrp_test        
version: 1
dn: cn=SudoGrp_test,ou=netgroup,dc=ldapserver,dc=com
nisNetgroupTriple: (,thomasw,)
cn: SudoGrp_test
description: test
description: Thomas Wu
objectClass: top
objectClass: nisNetgroup


Last edited by pludi; 02-15-2011 at 08:44 AM..
 

We Also Found This Discussion For You

1. Shell Programming and Scripting

need script for smbldap-useradd/setquota/ldapadd

Hello guys, I am trying to add users to samba/ldap system, set their quota, set them a common password and add auto_home records for the new users User list file is in below format Firstname Lastname Username Command I run to add user is smbldap-useradd -a -m -N $Firstname -S... (0 Replies)
Discussion started by: upengan78
0 Replies
REVNETGROUP(8)						       NIS Reference Manual						    REVNETGROUP(8)

NAME
revnetgroup - generate reverse netgroup data SYNOPSIS
/usr/lib/yp/revnetgroup [-u | -h] DESCRIPTION
Revnetgroup processes the standard input in netgroup(5) format into what is called reverse netgroup form. That is, where the original file shows netgroup memberships in terms of which members reside in a particular group, the reverse netgroup format specifies what groups are associated with a particular member. This information is used to generate the netgroup.byuser and netgroup.byhosts NIS maps. These reverse netgroup maps are used to help speed up netgroup lookups, particularly for the innetgr() library function. The revnetgroup command prints its results on the standard output. It is usually called only by /var/yp/Makefile when rebuilding the NIS netgroup maps. OPTIONS
-u Generate netgroup.byuser output; only username information in the original netgroup file is processed. -h Generate netgroup.byhost output; only hostname information in the original netgroup file is processed. FILES
/var/yp/Makefile The Makefile to build the NIS databases. /etc/netgroup The default netgroup database file. This file is most often found only on the NIS master server. SEE ALSO
getnetgrent(3), netgroup(5), AUTHOR
revnetgroup was written by Thorsten Kukuk <kukuk@linux-nis.org>. NIS Reference Manual 09/26/2007 REVNETGROUP(8)
All times are GMT -4. The time now is 07:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy