Results 1 to 5 of 5
Hello all.
I am working on a project to write a script in Perl to set a random password on a remote host and am looking for ways to make ...
- 11-28-2007 #1Just Joined!
- Join Date
- Nov 2007
- Posts
- 3
Expiring Password
Hello all.
I am working on a project to write a script in Perl to set a random password on a remote host and am looking for ways to make the password expire after a set period of time. I posted on the Perl forums and they referred me to this site.
In the scipt, I simply ssh into the host and then simply run a 'passwd' for the user name I am generating a password for. I wanted to use one of the arguments for 'passwd' to make it expire after 1 day (such as 'password -x -1 [username]'), but I do not have the account priveleges, and I do not believe the script will be run on root.
Are there any other ways I can reset the password remotely after a set period of time?
OR is there a way to automatically create a one-time password that expires after login?
Thanks in advance!
- 11-29-2007 #2Linux Enthusiast
- Join Date
- Aug 2006
- Location
- Portsmouth, UK
- Posts
- 539
Hi,
The command that springs to mind regarding password expiry is chage, however you need root permissions to use that one.
You might want to have a read through this to see if you can get the desired results by changing the default login settingsRHCE #100-015-395
Please don't PM me with questions as no reply may offend, that's what the forums are for.
- 11-29-2007 #3Just Joined!
- Join Date
- Nov 2007
- Posts
- 3
I looked into chage, but unfortunately, I won't be able to use this either.
Another thing I might mention is that the password would need to be changed within the hour it was set.
I don't know of any commands that will allow you to set a password to expire so soon? The only things I can think of is simply having the program wait for a little bit before changing the password?
Any other ways to accomplish this?
- 11-29-2007 #4Linux Enthusiast
- Join Date
- Aug 2006
- Location
- Portsmouth, UK
- Posts
- 539
Did you look at the link in my previous post?
RHCE #100-015-395
Please don't PM me with questions as no reply may offend, that's what the forums are for.
- 11-29-2007 #5Just Joined!
- Join Date
- Nov 2007
- Posts
- 3


Reply With Quote
