Sponsored Content
Full Discussion: chage -d equivalent
Special Forums Cybersecurity chage -d equivalent Post 302649541 by LinuxRacr on Thursday 31st of May 2012 03:27:15 PM
Old 05-31-2012
chage -d equivalent

Hello all,

I was wondering if there was a LINUX command equivalent of 'chage -d' on for the following UNIX flavors:

HP-UX
Solaris
AIX

I want to be able to change the aging for an account on each system without inadvertently expiring an account that is like with the "/bin/passwd -x" or '/bin/passwd -n" commands.

Thanks in advance,
 

10 More Discussions You Might Find Interesting

1. HP-UX

hp-ux mksysb equivalent

Hi Guys, Does hp-ux has mksysb equivalent with aix? Or something similar that you can save the system config. Or you just backup the boot image, that's it. Thanks in advance, itik (3 Replies)
Discussion started by: itik
3 Replies

2. Shell Programming and Scripting

ps ax equivalent in solaris

I am using "ps ax" command in one of my scripts . AIX has x flag for ps . is there any equilent command for ps ax in solaris ? Thanks (1 Reply)
Discussion started by: talashil
1 Replies

3. HP-UX

pwdx equivalent on HP

In sun solaris, pwdx will give the print working directory. Suppose I have 5 databases running on different oracle versions. If I want to know what database is running on what oracle version, I just give pwdx <process id>. It will show the oracle home details. Could you give me the... (10 Replies)
Discussion started by: oracleuser
10 Replies

4. HP-UX

lsof equivalent in HP-UX

I need lsof equivalent in HP-UX. I do not want to add lsof utility separately. (1 Reply)
Discussion started by: deo_kaustubh
1 Replies

5. UNIX for Dummies Questions & Answers

Zgrep equivalent-

Hi guys I cant use zgrep on a SunOS Do you know any alternative for it? i need to use zgrep -c grep works fine but zgrep is not supported (4 Replies)
Discussion started by: khestoi
4 Replies

6. Linux

Linux equivalent for...

I moved to a Linux system from Windows a few months ago. Most of the programs I had been using were already native to Linux (Firefox, the GIMP, Pari, etc.) and most others I found a close enough program (Crimson Editor -> gedit, Visual Studio -> KDevelop, Primo -> Morain's ECPP). Now I'm down... (1 Reply)
Discussion started by: CRGreathouse
1 Replies

7. Shell Programming and Scripting

need perl equivalent

Dear All, Good day, can any of you help me in the following problem: I need to find the perl equivalent for the following commandline grep characters |awk '{print \$2}'Expecting your reply and thanks in advance. Warm regards Fredrick. (4 Replies)
Discussion started by: Fredrick
4 Replies

8. Cybersecurity

Run chage as not root ?

Hello, Running Debian lenny. Is there any way to run $ chage --expiredate some_date user1 chage: Permission denied. as not root user inside script ? I really need to do this, I could grant whatever group membership to running user, setuid bit or whatever is needed ? (I do not want to do... (4 Replies)
Discussion started by: vilius
4 Replies

9. Shell Programming and Scripting

unable to chage the date format

Hi All, I want chage the date value YYMM to YYYYMM in my script. I am trying, but not get it. Eg: 1109 changed to 201109. $(if ] then echo "1" else echo "update_month<=$ARCHIVE_DT" fi) Through above i got "update_month<=1109" in else, but i must get it "update_month<=201109" ... (4 Replies)
Discussion started by: pdathu
4 Replies

10. Linux

RHEL 6.3 - chage command not redirecting the output to console.

When i am issuing chage command, it reporting the output properly. But when i redirect the output, i am not getting the output in the mentioned path. chage -l root >> /tmp/chage.txt. I need to use this into the script to capture the data. I think its seems to be bug with RHEL 6.3. Same... (3 Replies)
Discussion started by: Srini.rk1983
3 Replies
CHAGE(1)							   User Commands							  CHAGE(1)

NAME
chage - change user password expiry information SYNOPSIS
chage [options] LOGIN DESCRIPTION
The chage command changes the number of days between password changes and the date of the last password change. This information is used by the system to determine when a user must change his/her password. OPTIONS
The options which apply to the chage command are: -d, --lastday LAST_DAY Set the number of days since January 1st, 1970 when the password was last changed. The date may also be expressed in the format YYYY-MM-DD (or the format more commonly used in your area). -E, --expiredate EXPIRE_DATE Set the date or number of days since January 1, 1970 on which the user's account will no longer be accessible. The date may also be expressed in the format YYYY-MM-DD (or the format more commonly used in your area). A user whose account is locked must contact the system administrator before being able to use the system again. Passing the number -1 as the EXPIRE_DATE will remove an account expiration date. -h, --help Display help message and exit. -I, --inactive INACTIVE Set the number of days of inactivity after a password has expired before the account is locked. The INACTIVE option is the number of days of inactivity. A user whose account is locked must contact the system administrator before being able to use the system again. Passing the number -1 as the INACTIVE will remove an account's inactivity. -l, --list Show account aging information. -m, --mindays MIN_DAYS Set the minimum number of days between password changes to MIN_DAYS. A value of zero for this field indicates that the user may change his/her password at any time. -M, --maxdays MAX_DAYS Set the maximum number of days during which a password is valid. When MAX_DAYS plus LAST_DAY is less than the current day, the user will be required to change his/her password before being able to use his/her account. This occurrence can be planned for in advance by use of the -W option, which provides the user with advance warning. Passing the number -1 as MAX_DAYS will remove checking a password's validity. -R, --root CHROOT_DIR Apply changes in the CHROOT_DIR directory and use the configuration files from the CHROOT_DIR directory. -W, --warndays WARN_DAYS Set the number of days of warning before a password change is required. The WARN_DAYS option is the number of days prior to the password expiring that a user will be warned his/her password is about to expire. If none of the options are selected, chage operates in an interactive fashion, prompting the user with the current values for all of the fields. Enter the new value to change the field, or leave the line blank to use the current value. The current value is displayed between a pair of [ ] marks. NOTE
The chage program requires a shadow password file to be available. The chage command is restricted to the root user, except for the -l option, which may be used by an unprivileged user to determine when his/her password or account is due to expire. CONFIGURATION
The following configuration variables in /etc/login.defs change the behavior of this tool: FILES
/etc/passwd User account information. /etc/shadow Secure user account information. EXIT VALUES
The chage command exits with the following values: 0 success 1 permission denied 2 invalid command syntax 15 can't find the shadow password file SEE ALSO
passwd(5), shadow(5). shadow-utils 4.5 01/25/2018 CHAGE(1)
All times are GMT -4. The time now is 07:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy