03-04-2013 07:09 PM
Is it possible to send run time paramater to below command
/usr/sbin/usermod -p $(perl -e"print crypt('ABcd1234','xxxxxxxx')") -F $Zuser
i have to pass run time parameter to ABcd1234
03-04-2013 09:41 PM
You mean pass a shell variable to perl? In place of ABcd1234?
in usermod command ,for username I have passwd Zuser,in the same way I have to pass for password.
03-04-2013 10:02 PM
Well you can use obvious stuttering quotes:
/usr/sbin/usermod -p $(perl -e"print crypt('"$password"','xxxxxxxx')") -F $Zuser
Or you look up an exported variable in the environment.
Or pass it as an argument after the -e string.