Sending passwords using the Sun Ray Connector for Windows
By ThinGuy on Jun 05, 2006
When we were designing the Sun Ray Connector for Windows, we made a conscious decision not to allow users to send the password via the command line.
Why you may ask? Perhaps this will shed some light.
$ ps -ef |grep rdesktop
craig 20344 20334 0 20:16:48 ? 0:00 /opt/SUNWrdp/bin/rdesktop -a 24 -f -u craig -p SunRay123 margaritaville
steve 20123 20111 0 20:16:45 ? 0:00 /opt/SUNWrdp/bin/rdesktop -a 24 -f -u steve -p T3mecu!a margaritaville
For those that don't understand the above concern, it means that anyone who has access to run "ps" can read the password should someone choose to pass it on the command line. That pretty much means anyone who is logged on to the \*nix server.
If you want to safely pass the password to the Sun Ray Windows Connector (or RDesktop for that matter) from the command line, you can do so with expect.
spawn /opt/SUNWuttsc/bin/uttsc -m -A 24 -u craig -p Margaritaville
expect "Password: "
wait -i $spawn_id
#end of script
This will allow you to safely send the password via a script and not worry about snoopy people out there.
Hope that helps!