.bash_profile access related.

1.If a user adds the logout command in the .bash_profile file, then that user cant login.(I hope I'm correct) So, is there anyway to login into that users account without contacting the root or an administrator.

  1. Is there anyway to execute a command in remote machine rsh and uux seem to fail quite often.And for these two commands do I need to configure any file ?

  2. We ping a machine to see if its alive.. Is there an alternate command for it?

  3. Is there a way to escape symbols like '-' while deleting using rm, instead using some regex matchin the file. ex. to remove -300.txt will rm work?

PLease letme the solutions at the earliest. thanks a lot!

No. Someone with priviledges has to edit this file.

ssh root@server cat /etc/passwd

ICMP may be filtered, so that ping will fail, as well as traceroute, you can telnet to a certain port on the remote machine, e.g. telnet server 80

  • yes, put " " around the filename.

First up thanks.
By the way, Is there anyother way apart from using ssh ot execute a command in a remote machine.. seems rsh or uux can do but i dont seem to able to use it properly. can u please let me know if any...

  1. Is there a way to escape symbols like '-' while deleting using rm, instead using some regex matchin the file. ex. to remove -300.txt will rm work?

use -- this is used to say that the next arg. is not a command option.

rm -- -300.txt 

Is there anyother way apart from using ssh ot execute a command in a remote machine
expect scripts, however you'll need to learn how to write them:

 http://expect.nist.gov/ 

that "--" was cool denn.. thanks a lot.. Lastly I just wanted to know specifically if there was any way say a command to check to if a machine is up n running , by returning boolean values unlike ping. Hope I m clear..

No, unless you have client/server communication, like writing simple UPD server for returning values, or something like "SNMP agent"

< a href ="http://www.google.com"> google here</a>