Using Crontab To Change User Password


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Using Crontab To Change User Password
# 1  
Old 08-28-2007
Using Crontab To Change User Password

Hi!

I'm a bit noob on Unix/Linux world, so sorry any lame question i may make...
Oh.. and my english too.. is not so famous lol..

The deal is to use crontab to change my admin password every weak to something like "mypasswordcurrrentday" that is... i want evey weak to change my password but only the current day... for example

Fryday 6
mypassword6

Fryday 13
mypassword13

Fryday 20
mypassword20

I know i probably have to do a Shell Script but i don't think thats the problem i just need someone to indicate me what command i should use, because i can't seem to do it... If anyone knows something similar it would be usefull to.

Thanks in Advance.
# 2  
Old 08-28-2007
command passwd lets you change the password. crontab -e will help you in setting the cron job. You may have to use Expect in your script to feed password to passwd command. But then the script used in the cron job would expose your logic of making the password (unless it is a compiled script or program).

Consider the security risk before implementing this feature.
# 3  
Old 08-28-2007
Using expect in this way may help you, but as Yogesh pointed, there will be a security risk by exposing the logic. Why changing the password in this manner is needed ? Does anyone else has root access to this machine ?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

Not able to change user password

hi I am not able to change user password from root user. although it is saying updated successfully. but still I am not able to login direct to abc user. however I can login from root user by using su - abc # passwd abc Changing password for user abc. New password: BAD PASSWORD: it... (2 Replies)
Discussion started by: scriptor
2 Replies

2. Shell Programming and Scripting

Oracle DB user password change

Hi Experts, I am trying to write a shell script to change DB user password. Requirement: login to multiple DBs as multiple users and change their respective passwords. ex :users:T1,T2,T3 DB:X,Y,Z scenario: login as T1 to X,Y,Z change password login as T2 to X,Y,Z change password ... (2 Replies)
Discussion started by: navsan420
2 Replies

3. HP-UX

Problem in Change Password for user

Dears, I have a problem When I tried to change password for user in HP unix it gives me this error any one can help to solve this ? bmcaddm@nmssrv05: /home/bmcaddm # passwd Changing password for bmcaddm Old password: New password: Re-enter new password: vxfs: msgcnt 810034 mesg 001: V-2-1:... (8 Replies)
Discussion started by: ahmednoaman
8 Replies

4. Red Hat

password change for user on Redhat 5.6

Hi expert, after creating users on Redhat, i wantn to change their password with something that easy to remember and the way we use. For example #passwd username hello$123 it don't allow me. It may has something to do /etc/pam.d/filesXXXX there which i don't know to change to allow root... (1 Reply)
Discussion started by: lamoul
1 Replies

5. Solaris

Unable to change password for a user.

I am getting the following error message "passwd: User unknown: username" Permission denied error message when trying to change the password for that given user account. The user account is within the /etc/passwd file and I can also su to the account without any problems. This is sever is not... (11 Replies)
Discussion started by: eckmanb
11 Replies

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

7. Solaris

User password change trace

In Sun Solaris we have given oracle user for dba that was shared among 5 member. Everytime oracle user password was changed themselves. We want to trace who has changed the password. It is possible. Regards P Manivannan (0 Replies)
Discussion started by: pmsuper
0 Replies

8. Solaris

how can I change user name and password , of account ?

passwd only changes the password but i need to change the user name tnx (5 Replies)
Discussion started by: umen
5 Replies

9. UNIX for Dummies Questions & Answers

Can't change password for a user

All, I am unable to change a password for the user called : poller I am logged in as root When I do the following command passwd poller New Password: Permission denied Whe i enter the new password, it gives the above error. When i log in as poller and then execute the command, then... (2 Replies)
Discussion started by: rahulrathod
2 Replies

10. Solaris

Change password - User does not exist

When trying to change the password with the command "passwd" it returns that the user does not exist. passwd <USER> passwd: changing password for <USER> passwd: <USER> does not exist This is a Solaris 2.5.1 system. (7 Replies)
Discussion started by: ryamada
7 Replies
Login or Register to Ask a Question