10-06-2015
Set sudo access to expire on given day\date?
Scenario: Admin wants to grant user temporary access to sudo that will expire on an arbitrary date\day. Say, after 10 days, sudo rights disappear automatically.
I'm sure there's a way to hack something together with a script or cron job, but I was wondering if anyone has a package \ tool \ other that automates and makes this easy? If not, how do you recommend implementing it with cron \ script?
OS is Red Hat 6.x.
Thanks!
10 More Discussions You Might Find Interesting
1. Solaris
Hello
I want to set the password for user never expire through the command line. For your information the box is running under Solaris 8 platform. (2 Replies)
Discussion started by: shamsul
2 Replies
2. Red Hat
Hi All,
Is this true on chage command?
-M, MAX_DAYS
Passing the number -1 as MAX_DAYS will remove checking a password's validity.
Does this means password will not expire anymore?
Thanks for any comment you may add. (0 Replies)
Discussion started by: itik
0 Replies
3. Solaris
Hi,
I have a small problem that I need to address regarding the password expiration for a number of different oracle accounts. Currently I have the MAXWEEKS set to 12 in the /etc/default/passwd file for all accounts. I also have sudo installed on the server and users access the oracle accounts... (2 Replies)
Discussion started by: sparcman
2 Replies
4. Shell Programming and Scripting
Hi,
does anybody know how to format `date` command correctly to return the day of the week? Thanks -A
I work in ksh.... (1 Reply)
Discussion started by: aoussenko
1 Replies
5. Shell Programming and Scripting
Hi guys,
I had a scenario...
1. I had to get the previous days date in yyyymmdd format
2. i had to create a file with Date inthe format yyyymmdd.txt format
both are different
thanks guys in advance.. (4 Replies)
Discussion started by: apple2685
4 Replies
6. Shell Programming and Scripting
Hello All,
I want to create a script that will do ONLY su to any user on the server with hpadmin login using sudo. Can anyone let me know how can it do it.
Regards
Ankit (1 Reply)
Discussion started by: ajaincv
1 Replies
7. Shell Programming and Scripting
hello
chage command is a useful command for set expire date (suspend user) :
-E switch will update the “Account expires” value as shown below:
chage -E "2009-05-31" username
how can i write this shell script which can find present date and plus it with the value that user set,
like today... (7 Replies)
Discussion started by: nimafire
7 Replies
8. Shell Programming and Scripting
Hi,
I have a requirement where in i need to write a shell script to set users password to never expire. I know the command which is used to perform the same .. which is chage command.
But, could not figure out how to do the same in shell script.
Could you please help me with the shell... (3 Replies)
Discussion started by: suren424
3 Replies
9. Shell Programming and Scripting
i try to set linux date & time in specific format but it keep giving me error
Example :
date "+%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01"
or
date +"%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01"
keep giving me this error :
date: invalid date ‘19-01-2017 00:05:01'
Please use CODE tags... (7 Replies)
Discussion started by: umen
7 Replies
10. UNIX for Beginners Questions & Answers
I Have text like
XXX_20190908.csv.gz need to replace Only date in this format with current date every day
Thanks! (1 Reply)
Discussion started by: yamasani1991
1 Replies
LEARN ABOUT DEBIAN
eventstat
EVENTSTAT(8) System Manager's Manual EVENTSTAT(8)
NAME
eventstat - a tool to measure system events.
SYNOPSIS
eventstat [-rcsv_file][-nevent_count][delay [count]]
DESCRIPTION
eventstat is a program that dumps the current active system events.
OPTIONS
eventstat options are as follow:
-h show help
-n event_count
only display the first event_count number of top events.
-q run quietly, only really makes sense with -r option.
-r csv_file
output gathered data in a comma separated values file. This can be then imported and graphed using your favourite open source spread
sheet.
-t threshold
ignore samples where the event delta per second less than the given threshold
EXAMPLES
Dump events every second until stopped.
sudo eventstat
Dump the top 20 events every 60 seconds until stopped.
sudo eventstat -n 20 60
Dump events every 10 seconds just 5 times.
sudo eventstat 10 5
SEE ALSO
powertop(8)
AUTHOR
eventstat was written by Colin King <colin.king@canonical.com>
This manual page was written by Colin King <colin.king@canonical.com>, for the Ubuntu project (but may be used by others).
June 13, 2012 EVENTSTAT(8)