Sponsored Content
Full Discussion: Set expire date for users
Top Forums Shell Programming and Scripting Set expire date for users Post 302919701 by RudiC on Friday 3rd of October 2014 08:33:11 AM
Old 10-03-2014
Try the last command... if available on your system.
 

10 More Discussions You Might Find Interesting

1. Solaris

Set Password Never Expire

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. Solaris

EUID set for all non-root users

We have a Solaris box. I noticed that whenever any non-root user logins into the box and issues the command id the output is (for example) uid=42568(sam) gid=1245(sam) euid=0(root) egid=2(bin). I have not given any privileges to anyone explicitly. When I issued ls -l in the /usr/bin directory I... (1 Reply)
Discussion started by: chrisanto_2000
1 Replies

3. Red Hat

set password not to expire

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

4. Shell Programming and Scripting

Set system date to some date (Sunos)

I am testing a script and need to change the system date to Nov 30 2009. I cannot seem to find a way to do this other than TZ command but it does not seem to work correctly. I tried TZ=GMT+168 date but it is returning todays date Mon Dec 7 19:48:11 GMT 2009 ...instead of Nov 30 2009 I... (4 Replies)
Discussion started by: hanton
4 Replies

5. UNIX for Dummies Questions & Answers

To set different file permissions for different users of same group

Hi, If User1, User2 and User3 are in the same group. User1 should not be able to view the files of User2 and User3. But User2 and User3 should be able to view all files. How to set permission for this. Please help. Thanks, Priya. (1 Reply)
Discussion started by: banupriyat
1 Replies

6. UNIX for Dummies Questions & Answers

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... (3 Replies)
Discussion started by: DustinT
3 Replies

7. Shell Programming and Scripting

Shell script to set user password to never expire in UNIX servers

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

8. SCO

Cannot use 'date -t' to set the system date and time

Hi! All, I am trying to reset the date and time since the change in time over the weekend. I cannot issue the command date -t 201703131330. The system gives me an error invalid option. This happens on my SCO OpenServer 5.0.7 and 5.0.6. Do anyone have an idea why? I even tried using... (6 Replies)
Discussion started by: trolley
6 Replies

9. HP-UX

How to set variable for users with no home directory?

Hi I need to set $HISTFILE for a user with no home directory. How to go about it because this user does not have a .profilefile. (5 Replies)
Discussion started by: fretagi
5 Replies

10. Shell Programming and Scripting

Date: invalid date trying to set Linux date in specific format

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
explain_system_or_die(3)				     Library Functions Manual					  explain_system_or_die(3)

NAME
explain_system_or_die - execute a shell command and report errors SYNOPSIS
#include <libexplain/system.h> void explain_system_or_die(const char *command); void explain_system_success_or_die(const char *command); int explain_system_success(const char *command); DESCRIPTION
These functions may be used to execute commands via the system(3) function, and report the results. explain_system_or_die void explain_system_or_die(const char *command); The explain_system_or_die function is used to call the system(3) system call. On failure an explanation will be printed to stderr, obtained from explain_system(3), and then the process terminates by calling exit(EXIT_FAILURE). This function is intended to be used in a fashion similar to the following example: int status = explain_system_or_die(command); command The command, exactly as to be passed to the system(3) system call. Returns: This function only returns on success, see system(3) for more information. On failure, prints an explanation and exits. explain_system_success_or_die void explain_system_success_or_die(const char *command); The explain_system_success_or_die function is used to call the system(3) system call. On failure, including any exit status other than EXIT_SUCCESS, an explanation will be printed to stderr, obtained from explain_system(3), and then the process terminates by calling exit(EXIT_FAILURE). This function is intended to be used in a fashion similar to the following example: explain_system_success_or_die(command); command The command, exactly as to be passed to the system(3) system call. Returns: This function only returns on success. On failure, prints an explanation and exits. explain_system_success int explain_system_success(const char *command); The explain_system_success function is used to call the system(3) system call. On failure, including any exit status other than EXIT_SUC- CESS, an explanation will be printed to stderr, obtained from explain_system(3). However, the priniting of an error message does not also cause exit(2) to be called. This function is intended to be used in a fashion similar to the following example: int status = explain_system_success(command); command The command, exactly as to be passed to the system(3) system call. Returns: the value returned by the system(3) system call. In all cases other than EXIT_SUCCESS, an error message will also have been printed to stderr. SEE ALSO
system(3) execute a shell command explain_system(3) explain system(3) errors exit(2) terminate the calling process COPYRIGHT
libexplain version 0.52 Copyright (C) 2008 Peter Miller explain_system_or_die(3)
All times are GMT -4. The time now is 09:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy