change user pwd in script?
how can I change the current path of a user executing the script?
so that for example they type "./changeme" and it moves them from their current directory to a different one I have a script right now that I want to put the user in a different directory when it exits but it the "cd /blah/blah" command at the end of the script has no effect on the user... thanks! |
I don't see the point in making them change their directory if it doesn't change any outcome in the process of changing their password, it would only mislead them in their pwd, etc.
All users with a valid shell can invoke the passwd command to change their passwords, etc. I'd say either create an alias for all users called changme that links to 'passwd' or you can create a symlink to it as well. But if you insist: Code:
#!/bin/bash |
woops, sorry bout that
by pwd i meant present working directory....their current path :) im just trying to have this script change the current directory of the user that is running it so I can dictate their path when the script is finished and they are returned to a command prompt |
All times are GMT -5. The time now is 04:58 AM. |