I'm trying to read from a file and add to LDAP


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting I'm trying to read from a file and add to LDAP
# 1  
Old 09-10-2005
I'm trying to read from a file and add to LDAP

Hi all
I'm trying to write a script that reads from a file and then insert the record by a command line tool into LDAP. here is the file format

FirstName LastName uid password

and here is the script that I wrot:

#!/bin/sh
INPUT='/export/home/user/input'

while read fname lname uid pass
do
imadmin user create -D ServiceAdmin -w **** -n domain.com -d sub.domain.com -F [${fname}] -L [${lname}] -l [${uid}] -W [${pass}] -H mail.domain.com
done < "${INPUT}"

the problem that I faced is that I got this messege:

stty: : Inappropriate ioctl for device

but the record was sccessfully enterd

What does the message mean? what did I do wrong ?

Regards
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

How to add new server into ldap?

Hello Admins, I need help in adding newly built solaris 10 zone into LDAP server. We have LDAP server running on Solaris 10. We just built new solaris zone and would like to add it to LDAP server. The LDAP serves as centralized user administration. Please let me know the steps. (1 Reply)
Discussion started by: snchaudhari2
1 Replies

2. Shell Programming and Scripting

Read file and add it into part of file

Hello let me explain senario. there is a file which name is config and it store main software variable: file main.conf contents: update="1" log_login="0" allow_ports="" deny_ports="21,22,23" and there is a file which name is ports.txt file ports.txt contents: 25,26,27 i... (3 Replies)
Discussion started by: nimafire
3 Replies

3. Solaris

LDAP Client not connecting to LDAP server

I have very limited knowledge on LDAP configuration and have been trying fix one issue, but unsuccessful. The server, I am working on, is Solaris-10 zone. sudoers is configured on LDAP (its not on local server). I have access to login directly on server with root, but somehow sudo is not working... (9 Replies)
Discussion started by: solaris_1977
9 Replies

4. Red Hat

How to add ldapusers in ldap server?

after configured ldap server with 5 user name ldapuser1 ldapuser2 ldapuser3 ldapuser4 ldapuser5 i have configured ldap client in client pc, this five users sucessfully login in client pc, now i want add one more user ldapuser6 how to add (0 Replies)
Discussion started by: ainstin
0 Replies

5. Shell Programming and Scripting

Read a file, add some text and send an email

Hi, If I am asking this question, you must have already figured out , that I am new to Unix, so here it goes I was trying to read a file, add some user defined content to it and send out an email , I did find out a way to achieve this, but looking at the code, it looks a bit crude to me, can... (3 Replies)
Discussion started by: karthikbhuvana
3 Replies

6. Programming

Read file and add value

i have a file outfile.txt which contain 12 22 i have written this program to read the file and show the output,but i dont know how to add these value and show the total. my-codes are #include<cmath> #include<cstdlib> #include<iostream> #include<fstream> using namespace std; int main ()... (4 Replies)
Discussion started by: console
4 Replies

7. UNIX for Dummies Questions & Answers

When reading a csv file, counter to read 20 lines and wait for minute then read next 20 till end

Hello All, i am a newbie and need some help when reading a csv file in a bourne shell script. I want to read 10 lines, then wait for a minute and then do a reading of another 10 lines and so on in the same way. I want to do this till the end of file. Any inputs are appreciated ... (3 Replies)
Discussion started by: victor.s
3 Replies

8. Shell Programming and Scripting

Read file and for each line replace two variables, add strings and save output in another file

Hi All, I have a file, let's call it "info.tmp" that contains data like this .. ABC123456 PCX333445 BCD789833 I need to read "info.tmp" and for each line add strings in a way that the final output is put /logs/ua/dummy.trigger 'AAA00001.FTP.XXX.BLA03A01.xxxxxx(+1)' where XXX... (5 Replies)
Discussion started by: Andy_ARG
5 Replies

9. Programming

Cannot read a file with read(fd, buffer, buffersize) function

# include <stdio.h> # include <fcntl.h> # include <stdlib.h> # include <sys/stat.h> int main(int argc, char *argv) { int fRead, fPadded, padVal; int btRead; int BUFFSIZE = 512; char buff; if (argc != 4) { printf ("Please provide all of the... (3 Replies)
Discussion started by: naranja18she
3 Replies

10. Solaris

sudoers file with groups in LDAP

Hello gurus, I've been working on a sudoers file to work with groups in LDAP. I've created the groups in LDAP and added the users to there respective groups. I've also setup my sudoers file to have the groups match what is in LDAP. And I've added ldap to nsswitch.conf in the group line. The... (6 Replies)
Discussion started by: em23
6 Replies
Login or Register to Ask a Question
Apache::Session::Browseable::Store::LDAP(3pm)		User Contributed Perl Documentation	     Apache::Session::Browseable::Store::LDAP(3pm)

NAME
Apache::Session::Browseable::Store::LDAP - Use LDAP to store persistent objects SYNOPSIS
use Apache::Session::Browseable::Store::LDAP; my $store = new Apache::Session::Browseable::Store::LDAP; $store->insert($ref); $store->update($ref); $store->materialize($ref); $store->remove($ref); DESCRIPTION
This module fulfills the storage interface of Apache::Session. The serialized objects are stored in an LDAP directory file using the Net::LDAP Perl module. OPTIONS
This module requires one argument in the usual Apache::Session style. The keys ldapServer, ldapBase, ldapBindDN, ldapBindPassword are required. The key ldapPort is optional. Example: tie %s, 'Apache::Session::Browseable::LDAP', undef, { ldapServer => 'localhost', ldapBase => 'dc=example,dc=com', ldapBindDN => 'cn=admin,dc=example,dc=com', ldapBindPassword => 'pass', Index => 'uid ipAddr', }; AUTHOR
Xavier Guimard, <guimard@> COPYRIGHT AND LICENSE
Copyright (C) 2010 by Xavier Guimard This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available. SEE ALSO
Apache::Session perl v5.14.2 2010-12-08 Apache::Session::Browseable::Store::LDAP(3pm)