LDAP search without "gecos" attribute


 
Thread Tools Search this Thread
Operating Systems Solaris LDAP search without "gecos" attribute
# 1  
Old 10-08-2012
LDAP search without "gecos" attribute

Hi all,

I have 2 users. One of them shows "gecos" attribute during ldapsearch but the other one is not showing the attribute.

Code:
bash-3.00# ldapsearch -h 10.26.73.2 -D "cn=directory manager" -w xxxx -b "uid=user01,ou=people,dc=xx,dc=xx,dc=xx,dc=com,dc=xx" objectclass=* 
version: 1
dn: uid=user01,ou=xx,dc=xx,dc=xx,dc=xx,dc=xx,dc=xx
objectClass: account
objectClass: shadowAccount
objectClass: posixAccount
objectClass: top
uid: user01
uidNumber: 1101
cn: user01
gidNumber: 205
gecos: Carlos Santana
homeDirectory: /home/user01
loginShell: /usr/bin/tcsh
userPassword: {SSHA}S0tK/E7R424Op1PbkPjO1P4kuu3tK9NMjxFhXw==
bash-3.00# 
bash-3.00# 
bash-3.00# 
bash-3.00# 
bash-3.00# ldapsearch -h 10.26.73.2 -D "cn=directory manager" -w xxxx -b "uid=user02,ou=people,dc=xx,dc=xx,dc=xx,dc=xx,dc=xx" objectclass=* 
version: 1
dn: uid=user02,ou=xx,dc=xx,dc=xx,dc=xx,dc=xx,dc=xx
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: account
objectClass: shadowAccount
objectClass: posixAccount
uid: user02
uidNumber: 2024
cn:: PGNuPg==
gidNumber: 205
homeDirectory: /home/user02
loginShell: /usr/bin/tcsh
givenName:: PGdpdmVOYW1lPiA=
sn:: PHNuPg==
mail:: PG1haWw+
description: Usuario de Prueba
userPassword: {SSHA}rJ9JlUqZYdgVUE8m/vUX04CtgMu2X0Afmh5+Og==
bash-3.00#

Do you know why gecos attribute is showed only with user01 ?

Do you know how can I add "gecos" attribute on the user02 ?

I hope you can help me
Thanks a lot

Last edited by Scott; 10-08-2012 at 03:37 PM.. Reason: Please use code tags.
# 2  
Old 10-09-2012
Quote:
Originally Posted by Yohanna Flores
Do you know why gecos attribute is showed only with user01 ?
Because only user1 has this attribute set.
Quote:
Do you know how can I add "gecos" attribute on the user02 ?
Code:
ldapmodify -h 10.26.73.2 -D "cn=directory manager" -w xxxx <<%
dn: uid=user02,ou=xx,dc=xx,dc=xx,dc=xx,dc=xx,dc=xx
changetype modify
add: gecos
gecos: Michael Jackson
%

Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 Replies

2. Shell Programming and Scripting

Search file containing ps results for a match "my.cnf" and then for a second match . "ok:" and

I need to find two matches in the output from ps. I am searching with ps -ef |grep mysql for: my.cnf /bin/sh /usr/bin/mysqld_safe --defaults-file=/data/mysql/master/agis_core/etc/my.cnf after this match I want to search back and match the hostname which is x number of lines back, above the... (2 Replies)
Discussion started by: bash_in_my_head
2 Replies

3. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

4. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

5. Shell Programming and Scripting

grep with "[" and "]" and "dot" within the search string

Hello. Following recommendations for one of my threads, this is working perfectly : #!/bin/bash CNT=$( grep -c -e "some text 1" -e "some text 2" -e "some text 3" "/tmp/log_file.txt" ) Now I need a grep success for some thing like : #!/bin/bash CNT=$( grep -c -e "some text_1... (4 Replies)
Discussion started by: jcdole
4 Replies

6. UNIX for Advanced & Expert Users

something like LDAP Administrator 2011.1 "LDAP-SQL" but for the CLI

Hi I am searching a tool like "LDAP Administrator 2011.1"/ "LDAP-SQL" but for the CLI. Wish to use LDAP-SQL in scripts (non Windows GUI environment) http://ldapadministrator.com/resources/english/2011.1/images/sqlquery_large.png Softerra LDAP Administrator 2011.1 - What's New OS is... (2 Replies)
Discussion started by: slashdotweenie
2 Replies

7. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

8. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies
Login or Register to Ask a Question