Sponsored Content
Full Discussion: Check content
Top Forums Shell Programming and Scripting Check content Post 302857621 by Chubler_XL on Thursday 26th of September 2013 06:21:34 PM
Old 09-26-2013
Still not sure what you want to do. Do you want to find all users created in the last 7 days or check a given user was created recently?

Try selecting a known user and display their createTimestamp:

Code:
ldapsearch -LLL -h 192.168.1.100 -p 389 -D cn=admin,o=services -w pass -x \
    "(&(objectclass=*)(CN=ust3))" cn createTimestamp

I don't know if different AD versions store these dates differently by for the AD here I get this format of timestamp
createTimeStamp: 20130925001443.0Z in which case you would need to generate a test format like this:

Code:
timestamp=`date -d -7day +%Y%m%d000000.0Z`

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

To check the content of one file in another

Hi , I have a file called "X" . the content of X are X -- abc def and i have a file called "Y" , the content of Y are Y -- erty sdss s abc sfs def I need to check if the content of file X is contained in Y.Only unix (7 Replies)
Discussion started by: giri_luck
7 Replies

2. UNIX for Dummies Questions & Answers

check length content existence of variable

hi guys, im learning so be gentle... i'm wanting to write a script to read in a customer number. in order that the code is robust i want to check 1) the length of the value entered (4 characters) 2) that all characters entered are numeric between the values 1 to 3 3) that a value is... (1 Reply)
Discussion started by: skinnygav
1 Replies

3. Shell Programming and Scripting

Bash : Check aphanumeric content in variable

Hello everyone, I'm trying the best way to implement a check on a variable ... in particular I need to assess the content of characters and numbers , I tried on various manuals bash scripting but I could not figure out how to do ... any help? (3 Replies)
Discussion started by: ionral
3 Replies

4. Shell Programming and Scripting

How to check whether the web page is up without dowloading any content

Hi I am writing a script to check wheather the web page is up and running. I dont want to download the web page.. I I used wget --spider command. but i am not getting anything. can some one tell me the command to the web page.. if the page is up and running I should send a mail to my... (19 Replies)
Discussion started by: ahamed
19 Replies

5. Shell Programming and Scripting

Check file content type

I have a shell script that takes a file and uses "syncsort" to sort contents. I want to add a condition to check whether the input file is textual or binary format. If textual, the "syncsort" will be used to sort the files contents. Otherwise, the sorting process will be skipped. Note that the... (3 Replies)
Discussion started by: synthea
3 Replies

6. AIX

check web content - Ksh

Hi everybody! I wonder if I could see some text content of a website, via command line... That could be very helpful, in order to automatize a lot of projects im working on. thx a lot (2 Replies)
Discussion started by: Datinsky
2 Replies

7. Shell Programming and Scripting

Can i use grep to check variable content correctnes?

I need to know if is possible to use grep to check content of a local variable, for eg. i use read index and i want to check if the index i read is in correct form, how do i do that i tried with grep but i get errors all the time dont know how to make it work.. thanks! (3 Replies)
Discussion started by: Goroner
3 Replies

8. Shell Programming and Scripting

korn shell: check the content of a string of a variable

hello, i have a variable which should have following content : var="value1" or var="value2" or var="value2:*" # example: value2:22 how can i check : - if the content is ok (value1 / value2* ) - the two options of "value2" when content is example "value2:22" , i want to split... (3 Replies)
Discussion started by: bora99
3 Replies

9. Shell Programming and Scripting

Check content of file

Hi All, I m very new to unix...i jus want to chk the content of file. ma requirement is if file has a content then display it else dont display or something pls specify which loop shalli use either for or while?? (20 Replies)
Discussion started by: navsan
20 Replies

10. Shell Programming and Scripting

Check specific content from log file

Hi all, i have a logfile which is continuously being updated. I have built a script to check for a specific content and if it is found, it sends a string into a file. Here's the current script: #!/bin/bash logfile=/opt/jboss-eap-6.3/standalone/log/server.log tail -fn0 $logfile | \... (7 Replies)
Discussion started by: nms
7 Replies
pam_timestamp_check(8)					   System Administrator's Manual				    pam_timestamp_check(8)

NAME
pam_timestamp_check - check or clear authentication timestamps SYNOPSIS
pam_timestamp [[-d]|[-k]] [target_user] DESCRIPTION
With no arguments, pam_timestamp_check will check to see if the default timestamp is valid, or optionally remove it. OPTIONS
-k instead of checking the validity of a timestamp, remove it. This is analogous to sudo's -k option. -d Instead of returning validity using an exit status, loop indefinitely, polling regularly and printing the status on standard output. target_user The default behavior of pam_timestamp_check checks or removes timestamps generated by pam_timestamp when the user authenticates as herself. When the user authenticates as a different user, the name of the timestamp file changes to accomodate this. DIAGNOSTICS
When checking if a timestamp is valid, pam_timestamp_check returns an exit code of 0 for success and > 0 on error: 2: binary is not setuid-root 3: invalid invocation 4: user unknown 5: permissions error 6: invalid controlling tty 7: other error SEE ALSO
pam_timestamp(8) BUGS
Let's hope not, but if you find any, please email the author. AUTHOR
Nalin Dahyabhai <nalin@redhat.com> Red Hat Linux 2002/05/23 pam_timestamp_check(8)
All times are GMT -4. The time now is 04:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy