Sponsored Content
Top Forums Shell Programming and Scripting how to change root password using shell script with standard password Post 302290789 by kurva on Tuesday 24th of February 2009 05:16:53 AM
Old 02-24-2009
Java how to change root password using shell script with standard password

Hi Friends.
I am new to scripting now i want to change the root password using the script with standard password.

which is the easy scripting to learn for the beginner, Thanks in advance.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Change Password In A Shell Script

Hi All, I have a problem. I need to write a shell script to change the password. The user may want to change his own password by this script. He will have to provide the required 3 parameters i.e. old password, new password and retype new password as arguments in command line. like,... (6 Replies)
Discussion started by: pintu_asim
6 Replies

2. Shell Programming and Scripting

script to change root password

Hi All, I'm looking for a script to change root password for about 200 servers of both Solaris and Linux. I'm not very good at scripting, can anyone share a script if you already have one? :) (3 Replies)
Discussion started by: kvadivel80
3 Replies

3. Shell Programming and Scripting

force to change password(shell script)

hi How can I force user to change of password by modifying the password expiry and the grace period so that the user has at least 1 week to login and change the password...... (3 Replies)
Discussion started by: tjay83
3 Replies

4. Solaris

Solaris 8 - Asks for current root password when trying to change root password.

Hello All, I have several solaris boxes running Solaris 8. When changing root passwords on them, all will simply ask for the new root password to change and of course to re-type the new password. One of the systems however asks for the existing root password before it will display the new password... (8 Replies)
Discussion started by: tferrazz
8 Replies

5. UNIX for Dummies Questions & Answers

What are standard root password control applications?

According to security guide i came across term as "standard root password control application " I have no imformation over what are such applications how to implement them? Any guidance will be appreciated. It was also suggested to audit root login .How would i go about it? (1 Reply)
Discussion started by: pinga123
1 Replies

6. Shell Programming and Scripting

Create script for change root password via SSH

HI I 'm new shall script and unix. I want to create script for change password root by ssh-keygen command . I have 50 servers and I want ot login ot the servers via ssh by type ones password and can login every machines.The script ssh-keygen must ot generate key every weekly than it send new... (2 Replies)
Discussion started by: pellnapook
2 Replies

7. Shell Programming and Scripting

Shell script to change the password

Hi Folks, I am trying to change the password for the user "sysservice" Where my requirement is login to each server and exit from that and ssh to the next server.. I have enabled the password less auth for the user sysservice. for i in `cat /home/sysservice/servers.txt` do ssh... (1 Reply)
Discussion started by: gsiva
1 Replies

8. UNIX for Beginners Questions & Answers

Can a root role change the root password in Solaris 10?

i do not have root on a solairs 10 server , however i do have the root role, i was wondering if I can change the root password as a a role with the passwd command? I have not tried yet. and do i have to use the # chgkey -p afterwards? i need to patch is why i am asking. thanks (1 Reply)
Discussion started by: goya
1 Replies

9. UNIX for Beginners Questions & Answers

Parsing Root password inside a C shell script

Hello everyone, I want to check how long a remote computer is running (e.g. with the command uptime or who - b) The check should be done during login from none root user by a script which is called from .cshrc. My script works fine if I login as root but I want that everybody get the information... (5 Replies)
Discussion started by: Nadielosabra
5 Replies

10. Forum Support Area for Unregistered Users & Account Problems

Password sent via reset password email is 'weak' and won't allow me to change my password

I was unable to login and so used the "Forgotten Password' process. I was sent a NEWLY-PROVIDED password and a link through which my password could be changed. The NEWLY-PROVIDED password allowed me to login. Following the provided link I attempted to update my password to one of my own... (1 Reply)
Discussion started by: Rich Marton
1 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 09:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy