04-10-2009
pdadmin script help needed
Hello all,
I need to create a report for the list of users and related groups present in my ldap directory.
I need a script which does the following and give out a final script as specified. Any help is appreciated.
1)pdadmin -a sec_master -p <passwd> group show-members <groupname> >> groupmembers.txt
2)select each entry in groupmembers.txt and do the following commands in order:
2a)pdadmin -a sec_master -p <passwd> user show-groups <each entry in groupmembers.txt> >> user&group.txt
2b)pdadmin -a sec_master -p <passwd> user show <each entry in groupmembers.txt> |grep cn= , sn= >> user&group.txt (cn=firstname sn =lastname)
so finally the user&group.txt should contain something like this:
userid's groups firstname lastname
10 More Discussions You Might Find Interesting
1. Solaris
Hi Everyone , have a nice day
i am in certain directory and all files in that directory are of this format
SDPCDR_sdp05a_0189_20070320-174315.ASN~
now i want to calculate number of files based on this criteron
SDPCDR_sdp05*_*_20070301-*.ASN~
which intends to count files of sdp05 for... (1 Reply)
Discussion started by: Dastard
1 Replies
2. Shell Programming and Scripting
Hi
I am looking for the script which can move 1month old data from a TXT file.actully in this file data is appended on daily basis.pleasehalp me out.
Thanks in advance (3 Replies)
Discussion started by: vpandey
3 Replies
3. Shell Programming and Scripting
Hello all,
I would need a scirpt to perform the following operation:
I would like to give a spreadsheet as input with 3 columns with firstname,lastname,userid in order
The script should read from the spreadsheet and search if each user exists in particular groups "Group1" by using the... (2 Replies)
Discussion started by: sophos
2 Replies
4. Shell Programming and Scripting
hi,
Im trying to select from a sql using shell script and once i get count i need to add the count to the subject line and send mail to every1..
ex :
Select count(*) from emp;
In Shell script
echo $PASSWORD|$ORACLE_HOME/bin/sqlplus $USERID@$DBNAME @$SCRIPT_DIR/emp_count.sql... (1 Reply)
Discussion started by: jkumsi
1 Replies
5. Shell Programming and Scripting
Hi!
I have a file which has the following entry -
which has different service names with their corresponding URLs.
I want to echo the servicenames and curl each URL and find out if the URL is accessible or not. (2 Replies)
Discussion started by: jacki
2 Replies
6. Shell Programming and Scripting
Hey all. Sometimes I'm tasked to change some router configs for the entire network (over 3,000 Cisco routers). Most of the time its a global config parameter so its done with a loop and an IP list as its the same configuration change for all routers. This is working OK.
However, sometimes an... (3 Replies)
Discussion started by: mrkz1974
3 Replies
7. Shell Programming and Scripting
Here is a file that I want to run a script to do the following
File Content:
0883318739,13010,A,300,abcde
0880123456,5433,C,200,xcvfe
0882344242,4233,N,204,ghfsa
Script to be get:
Try to have a script that can match all the below criteria
1st field range from 08801xxxxx to 0882xxxxxx... (6 Replies)
Discussion started by: ahmed_as8
6 Replies
8. Shell Programming and Scripting
Hi team,
I am looking to execute some command through xargs.
$cat testfile | grep myloc
alias myloc='cd /export/nfs-1sv-23/'
I am trying to execute that alias as soon as i cat and grep ?
I tried with $cat testfile | grep myloc | xargs --> no luck ...
Can some one assist me with... (6 Replies)
Discussion started by: itsme488
6 Replies
9. Homework & Coursework Questions
TAG flow Between SDR and DELTA
SDR is the Source table.
Delta is the target table having one staging table and one Main table.
Tags flows between SDR and Delta through ER gateway.
From SDR (SDR.CUSTOMER_PRODUCT and SDR.CUSTOMER_PRODUCT_RELATIONSHIP) the Tags flows to ER... (2 Replies)
Discussion started by: patitapaban
2 Replies
10. Homework & Coursework Questions
Hi guys,
Hoping someone can help me with the below.
- Write a script called 'home.sh' which takes a username as its argument and
will print out the home directory of that user as follows:
$ ./home.sh root
root's home directory is /root
$ ./home.sh nobody
nobody's home directory is /... (9 Replies)
Discussion started by: edujs7
9 Replies
LEARN ABOUT REDHAT
mac2unix
dos2unix(1) General Commands Manual dos2unix(1)
NAME
dos2unix - DOS/MAC to UNIX text file format converter
SYNOPSYS
dos2unix [options] [-c convmode] [-o file ...] [-n infile outfile ...]
Options:
[-hkqV] [--help] [--keepdate] [--quiet] [--version]
DESCRIPTION
This manual page documents dos2unix, the program that converts plain text files in DOS/MAC format to UNIX format.
OPTIONS
The following options are available:
-h --help
Print online help.
-k --keepdate
Keep the date stamp of output file same as input file.
-q --quiet
Quiet mode. Suppress all warning and messages.
-V --version
Prints version information.
-c --convmode convmode
Sets conversion mode. Simulates dos2unix under SunOS.
-o --oldfile file ...
Old file mode. Convert the file and write output to it. The program default to run in this mode. Wildcard names may be used.
-n --newfile infile outfile ...
New file mode. Convert the infile and write output to outfile. File names must be given in pairs and wildcard names should NOT be
used or you WILL lost your files.
EXAMPLES
Get input from stdin and write output to stdout.
dos2unix
Convert and replace a.txt. Convert and replace b.txt.
dos2unix a.txt b.txt
dos2unix -o a.txt b.txt
Convert and replace a.txt in ASCII conversion mode. Convert and replace b.txt in ISO conversion mode. Convert c.txt from Mac to Unix
ascii format.
dos2unix a.txt -c iso b.txt
dos2unix -c ascii a.txt -c iso b.txt
dos2unix -c mac a.txt b.txt
Convert and replace a.txt while keeping original date stamp.
dos2unix -k a.txt
dos2unix -k -o a.txt
Convert a.txt and write to e.txt.
dos2unix -n a.txt e.txt
Convert a.txt and write to e.txt, keep date stamp of e.txt same as a.txt.
dos2unix -k -n a.txt e.txt
Convert and replace a.txt. Convert b.txt and write to e.txt.
dos2unix a.txt -n b.txt e.txt
dos2unix -o a.txt -n b.txt e.txt
Convert c.txt and write to e.txt. Convert and replace a.txt. Convert and replace b.txt. Convert d.txt and write to f.txt.
dos2unix -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt
DIAGNOSTICS
BUGS
The program does not work properly under MSDOS in stdio processing mode. If you know why is that so, please tell me.
AUTHORS
Benjamin Lin - <blin@socs.uts.edu.au>
Bernd Johannes Wuebben (mac2unix mode) <wuebben@kde.org>
MISCELLANY
Tested environment:
Linux 1.2.0 with GNU C 2.5.8
SunOS 4.1.3 with GNU C 2.6.3
MS-DOS 6.20 with Borland C++ 4.02
Suggestions and bug reports are welcome.
SEE ALSO
unix2dos(1) mac2unix(1)
1995.03.31 dos2unix v3.0 dos2unix(1)