Sponsored Content
Operating Systems Solaris cronjob dies when user password expires Post 302105488 by funksen on Friday 2nd of February 2007 05:02:27 AM
Old 02-02-2007
the problem is you cannot switch to a user (like cron does) and run programs when the password is expired, because you are prompted to change it

you can check the "ADMCHG" Flag in /etc/security/passwd with a rootcron first, and remove it (just works for the oracle user)

for root you just can turn the password-policy off afaik
 

10 More Discussions You Might Find Interesting

1. Solaris

How to run a script as different user inside cronjob in solaris.

Hi , I have a shell script to perform some actions on sun solaris box . This script normally requires to be run as a different user. so, whenever i have to run this script, i need to sudo in as that user , enter the password and execute it. Now,I have to setup a cronjob to execute the script... (11 Replies)
Discussion started by: csg_user
11 Replies

2. UNIX for Advanced & Expert Users

HOw do i give a user cronjob edit/settings permission?

Hi, In a Unix Server when i 'su' to my name and type in crontab it says " You are not authorised......". Pls suggest what to do? How do i give myself permission so that I can schedule a cron. (2 Replies)
Discussion started by: debu
2 Replies

3. UNIX for Dummies Questions & Answers

Change Account to not lock account if password expires

I have access to 15+ UNIX boxes at work, and I do not consistently log onto all of them over time. When I do try to access one I havent been on in awhile, my account is locked as the password has expired. I need to request to the UNIX SA's that the password expiration is 90 days and that if it... (1 Reply)
Discussion started by: stringzz
1 Replies

4. UNIX for Advanced & Expert Users

password verification verify password of a user for only first 8 characters

Helo , I m using linux pam library for user and its password authentication. I m creating new user and giving its password.I m giving password of 10 characters.now when I login in as that newly created user its ask me $ su - ram Password: You are required to change your password immediately... (12 Replies)
Discussion started by: amitpansuria
12 Replies

5. Shell Programming and Scripting

cronjob on a remote ssh without typing password

Hi there, How can I send a script to a remote ssh client. 1) I cannot connect through ftp 2) I just need to read a file on a remote server. Here is what I do: ~$ ssh santiago@myserver.com santiago@myserver.com's password: santiago@myserver:~$ cat logfile hello world bonjour le monde hola... (1 Reply)
Discussion started by: chebarbudo
1 Replies

6. Solaris

Check when password expires

How do I check to see when a password expires on a user account with using the CLI? (1 Reply)
Discussion started by: jastanle84
1 Replies

7. Shell Programming and Scripting

Cronjob not working from user's crontab

Hi All, I am trying to execute a python script from a user's crontab. /home/user1/UDE/scripts/UdeManager.py I am at /home/user1. If I run the command "/home/user1UDE/scripts/UdeManager.py" from the users home directory its working fine. But when I try to run from user's cron tab its... (3 Replies)
Discussion started by: Tuxidow
3 Replies

8. Red Hat

Cronjob not working at user timezone

I have created user and set timezone different from root user timezone in .bash_profile of user using TZ command, i have created cronjob for user using crontab -e, my concern is that job schedule in cronjob must executive as per timezone of user , but i am getting that job schedule in cron of user... (6 Replies)
Discussion started by: Mahenaaz
6 Replies

9. UNIX for Dummies Questions & Answers

Script does not run from a user specific cronjob.

Hello, I have two crontabs, one for the root and one for another user. There is a script in my configurations that has to send a email. The script works and sends the emails when I run it by hand with either the root or the user, and when I program it in the root's crontab. But! It does not... (3 Replies)
Discussion started by: Tralaraloro
3 Replies

10. Shell Programming and Scripting

Cronjob for root password change.

Hi, I am writing a cronjob which changes default root password to some designated password(set) after 15 days. The requirement for same is because i need to give application team root access for first 15 days, but after that the default password should be changed, now I want to automate the... (3 Replies)
Discussion started by: nixhead
3 Replies
passwd(1)						      General Commands Manual							 passwd(1)

NAME
passwd - change user password SYNOPSIS
passwd [-f|-g|-s|-k[-q]] [name] passwd [-D binddn][-n min][-x max][-w warn][-i inact] account passwd [-D binddn] {-l|-u|-d|-S[-a]|-e} name passwd --bioapi [account] passwd --stdin [account] DESCRIPTION
passwd changes passwords for user and group accounts. While an administrator may change the password for any account or group, a normal user is only allowed to change the password for their own account. passwd also changes account information, such as the full name of the user, their login shell, password expiry dates and intervals or disable an account. passwd is written to work through the PAM API. Essentially, it initializes itself as a "passwd" service and utilizes configured "password" modules to authenticate and then update a user's password. A sample /etc/pam.d/passwd file might look like this: #%PAM-1.0 auth required pam_unix2.so nullok account required pam_unix2.so password required pam_pwcheck.so nullok password required pam_unix2.so nullok use_first_pass use_authtok session required pam_unix2.so Password Changes If an old password is present, the user is first promted for it and the password is compared agaisnt the stored one. This can be changed, depending which PAM modules are used. An administrator is permitted to bypass this step so that forgotten passwords may be changed. After the user is authenticated, password aging information are checked to see if the user is permitted to change their password at this time. Else passwd refuses to change the password. The user is then prompted for a replacement password. Care must be taken to not include special control characters or characters, which are not available on all keyboards. If the password is accepted, passwd will prompt again and compare the second entry against the first. Both entries are require to match in order for the password to be changed. OPTIONS
-f Change the finger (gecos) information. This are the users fullname, office room number, office phone number and home phone number. This information is stored in the /etc/passwd file and typically printed by finger(1) and similiar programs. -g With this option, the password for the named group will be changed. -s This option is used to change the user login shell. A normal user may only change the login shell for their own account, the super user may change the login shell for any account. -k Keep non-expired authentication tokens. The password will only be changed if it is expired. -q Try to be quiet. This option can only be used with -k. Password expiry information -n min With this option the minimum number of days between password changes is changed. A value of zero for this field indicates that the user may change her password at any time. Else the user will not be permitted to change the password until min days have elapsed. -x max With this option the maximum number of days during which a password is valid is changed. When maxdays plus lastday is less than the current day, the user will be required to change his password before being able to use the account. -w warn With this option the number of days of warning before a password change is required can be changed. This option is the number of days prior to the password expiring that a user will be warned the password is about to expire. -i inact This option is used to set the number of days of inactivity after a password has expired before the account is locked. A user whose account is locked must contact the system administrator before being able to use the account again. A value of -1 disables this feature. Account maintenance -l A system administrator can lock the account of the specified user. -u A system administrator can unlock the specified account, if the account is not passwordless afterwards (it will not unlock an account that has only "!" as a password). -d The password of the given account can be deleted by the system administrator. If the BioAPI interface is used the BioAPI data for that account is removed. -S Report password status on the named account. The first part indicates if the user account is locked (LK), has no password (NP), or has an existing or locked password (PS). The second part gives the date of the last password change. The next parts are the minimum age, maximum age, warning period, and inactivity period for the password. -a Report the password status for all accounts. Can only be used in conjunction with -S. -e The user will be forced to change the password at next login. -P path Search passwd and shadow file in path. This option cannot be used with changing passwords. --bioapi This option is used to indicate that passwd should use the BioAPI for managing the authentication token of an account. It is only supported with a small subset of other options. This option is not always available. --stdin This option is used to indicate that passwd should read the new password from standard input, which can be a pipe (only by a system administrator). Name service switch options -D binddn Use the Distinguished Name binddn to bind to the LDAP directory. FILES
passwd - user account information shadow - shadow user account information SEE ALSO
passwd(1), group(5), passwd(5), shadow(5), pam(5) AUTHOR
Thorsten Kukuk <kukuk@suse.de> pwdutils November 2005 passwd(1)
All times are GMT -4. The time now is 09:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy