I did sudo because I couldn't figure out how to invoke su, and still run in tcsh. By default the users run bash and eventhough I put #!/bin/tcsh at the beginning of the script, it would still run in bash.
What I want to do is find out the current screen saver settings the current user has set.
The way that I'm doing it now is, I split the tasks into two different scripts.
#!/bin/tcsh
set j=`users`
foreach k ($j)
echo $k
if ("$k" != 'root') then
sudo -u $k /usr/bin/forceScreenSaverSimple
exit...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.