171 reputation
4
bio website folk.ntnu.no/jabirali
location Norway
age 24
visits member for 4 years, 8 months
seen May 26 '11 at 9:15

I'm currently a student of Applied Physics and Mathematics, and enjoy tinkering with computers in my spare time.


Jul
22
answered linux logfile does not open correctly in windows notepad
Jul
19
revised using su inside of a shell script
I edited the wrong code last time, fixed it now
Jul
18
answered Most elegant way of ssh copying a file to a remote host, then executing it
Jul
17
awarded  Supporter
Jul
17
comment using su inside of a shell script
Replace the <br /> above with newlines in your script. Off-topic: Can you add newlines to ServerFault comments? That would be quite useful when posting code snippets...
Jul
17
comment using su inside of a shell script
As for how you invoke su -c over SSH: ssh -t user@host 'su -lc "<br /> echo this is a test <br /> echo this is another test<br /> "<br /> '
Jul
17
comment using su inside of a shell script
If you choose to use su -c instead of sudo, you should run SSH with the -t flag - you will be prompted for the root password on the server when the command is executed. Providing a password directly to su as a command line argument is neither supported (as far I know), nor recommended - since a simple ps -ef | grep su reveals all arguments passed to su, including any password provided from the commandline...
Jul
16
awarded  Teacher
Jul
15
answered How to tar.gz *.php, *.txt, *.inc, *.js, *.css, *.php3 files?
Jul
15
answered Split vim window
Jul
15
answered Languages in vim editor
Jul
15
revised Is linux VI editor different from vim editor
improved formatting
Jul
15
awarded  Editor
Jul
15
revised Is linux VI editor different from vim editor
Addded some info
Jul
15
answered Is linux VI editor different from vim editor
Jul
15
answered Easy notification of arbitrary events on remote Linux/Unix computer
Jul
15
comment using su inside of a shell script
If you need more information about adding that NOPASSWD rule, check the examples at the bottom of man sudoers. Also, remember to use visudo when editing your sudoers file to avoid breakage!
Jul
15
answered using su inside of a shell script
Jul
15
awarded  Autobiographer