force to change password(by modifying /etc/shadow)


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting force to change password(by modifying /etc/shadow)
# 1  
Old 09-24-2008
force to change password(by modifying /etc/shadow)

hi
by modifying /etc/shadow
how can I Force a change of password so that user has at least 1 week to login?

I did it by using:

Code:
echo "enter username to force password change"  
read user;
chage -M 7 $user;

How can I do it by modifying /etc/shadow??
# 2  
Old 09-24-2008
I'd say compare your /etc/shadow before you use "chage" and after. But why do you want to do that by modifying your /etc/shadow instead of using "chage"?
# 3  
Old 09-24-2008
cos,chage command is not workin...
# 4  
Old 09-24-2008
???????
# 5  
Old 09-25-2008
???????
# 6  
Old 09-25-2008
It's not allowed to bump up questions! Please read the rules.
# 7  
Old 09-27-2008
ok....
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

/etc/shadow encrypted password

Hi I wonder whether is possible to generate enrypted passwd for some user and paste it into /etc/shadow file ? What kind of encryption is used in /etc/shadow file ? ths for help. (1 Reply)
Discussion started by: presul
1 Replies

2. Shell Programming and Scripting

Change Last Login within /etc/shadow

Was wondering if any had a script to change the last login field within the /etc/shadow? Need to it run against machines to "reset" the last login so local accounts will not expire if account isn't access within the mandatory setting we are force to implement. Thanks!!!! (5 Replies)
Discussion started by: Luv_STL
5 Replies

3. Red Hat

how to force a user to change the password

RHEL 5 update 4. How to force a user to change the password at his next logon. Thanks in advance. (8 Replies)
Discussion started by: uxadmin007
8 Replies

4. Solaris

Password Recovery From /etc/shadow file

Is it possible to reset a normal user password , by editing password field in /etc/shadow file? Thanks (6 Replies)
Discussion started by: ksvaisakh
6 Replies

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

6. UNIX for Dummies Questions & Answers

Server wide password enforcement rules? 90 day force change.

Using Solaris 9 and 10. What we want to do is set up global rules for our password files to restrict all users, not only new ones set up with the rules but also the ones that have been sitting on the system for years. Is there a global way to force all users to change their password every 90... (1 Reply)
Discussion started by: LordJezo
1 Replies

7. UNIX for Dummies Questions & Answers

shadow file after a password reset

hi, I had to reset a lost root password by editing the /etc/passwd and /etc/shadow files ( this is a xen vm file, so i mounted and chrooted the file ) after the reboot with an empty password on root , i have set a new password with passwd but it only changed the /etc/passwd file.... (0 Replies)
Discussion started by: progressdll
0 Replies

8. UNIX for Dummies Questions & Answers

remove shadow password

Does anyone know how to remove a stanza in the shadow password file if the user account has already been removed on an AIX box? I know it can be done by editing the file itself but I would prefer not to do it that way. cheers gizaa (2 Replies)
Discussion started by: gizaa
2 Replies

9. UNIX for Advanced & Expert Users

Force to change to a different password

Hi, I notice in my Sun Solaris 8 sparc worstation, I am able to change my password to same existing password. That is, right now my password is abc, and I change it with "passwd" command and change it abc again. It will accept. How can I make it such that it will not accept same password?... (3 Replies)
Discussion started by: champion
3 Replies

10. UNIX for Advanced & Expert Users

Force Password Change...RedHat 7.1

Hello, I just finished adding a bunch of new users to the linux servers I administer. I add users either via command line or via linuxconf, but I can't seem to find out how to force users to change their passwords on their first login to the system. Anyone know how to do that? My HP-UX... (1 Reply)
Discussion started by: vancouver_joe
1 Replies
Login or Register to Ask a Question