.bash_profile access related.


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users .bash_profile access related.
# 1  
Old 02-06-2008
.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.

2. 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 ?

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

4. 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!

Last edited by sriram_r; 02-06-2008 at 02:57 AM..
# 2  
Old 02-06-2008
Quote:
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.
No. Someone with priviledges has to edit this file.
Quote:
2. 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 ?
ssh root@server cat /etc/passwd

Quote:
3. We ping a machine to see if its alive.. Is there an alternate command for it?
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

Quote:
4. 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?
- yes, put " " around the filename.
# 3  
Old 02-06-2008
Java @sysgate

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...
# 4  
Old 02-06-2008
4. 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.
Code:
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:
HTML Code:
 http://expect.nist.gov/
# 5  
Old 02-07-2008
@denn

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..
# 6  
Old 02-07-2008
No, unless you have client/server communication, like writing simple UPD server for returning values, or something like "SNMP agent"
# 7  
Old 02-14-2008
< a href ="http://www.google.com"> google here</a>
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

Renaming .bash_profile to .profile

Hi Gurus, Recently we have migrated our servers from AIX to Linux. Most of the scripts written in AIX server are sourcing environment variables using .profile file. Now we have the following options: 1. Change all the scripts where ever .profile is being used and replace it with... (14 Replies)
Discussion started by: svajhala
14 Replies

2. UNIX for Dummies Questions & Answers

.bash_profile question

Hello everyone, I'm trying to set my .bash_profile to change my primary prompt from this: banbatchtest1v:MCPPRD:~>to this: banbatchtest1v:MCPPRD:/home/rcarvall> Here's what my .bash_profile looks like right now: # .bash_profile # Get the aliases and functions if ; then .... (2 Replies)
Discussion started by: galileo1
2 Replies

3. Shell Programming and Scripting

need downloading related help...but its not related to unix

Hi All, I am trying to dowmload the zip file "zkManageCustomers.zip " but i dont have access. Can anyone help me to download this file See the below link- http://www.ibm.com/developerworks/opensource/library/wa-aj-open/index.html?ca=drs- Please help me as early as... (1 Reply)
Discussion started by: aish11
1 Replies

4. UNIX for Advanced & Expert Users

bash_profile or .profile

Hi, happy new year. on AIX 6.1 , for user oracle , there are two files : bash_profile and .profile I do not know which one is executed when login ? How to know , More over in both of them we have : in .profile : ORACLE_HOME=/appli/oracle/product/10.2.0/db_1... (5 Replies)
Discussion started by: big123456
5 Replies

5. Shell Programming and Scripting

Problem in .bash_profile Linux

Hello Friends, I was trying to give a text/welcome message to a specific user just after his login. For that i had added a echo test message line in .bash_profile of that user. Which is not working .... Also i had to execute a script on his login for that i had tried to enter the... (6 Replies)
Discussion started by: NIMISH AGARWAL
6 Replies

6. UNIX for Dummies Questions & Answers

Access file ownership related questions

I have two issues; any help regarding this would be highly appreciated. We deployed a file abc using pqr id. So the owner is of abc file (shell script) is ‘pqr'. However, abc file is executed by ESP event and uses the id ‘xyz'. When the file abc is executed the owner of... (9 Replies)
Discussion started by: clearC
9 Replies

7. UNIX for Dummies Questions & Answers

bash_profile does not working

Hi all. when i connect as user megaguru i have a problem my .bash_profile does not working^:( if i do: . ./.bash_profile all enviroment variables are in place. How can i force linux to use .bash_profile before logon process? thanx in advance. (1 Reply)
Discussion started by: smallman
1 Replies

8. Shell Programming and Scripting

question in .bash_profile

We are more users using the oracle account, and people want to include theyr own files in .bash_profile. Like this: while ; do echo -n "LOGNAME is '$LOGNAME' (no sens), who are you? " >/dev/stderr read ln export LOGNAME=$ln done This works well when logging in to... (1 Reply)
Discussion started by: hannem
1 Replies

9. Shell Programming and Scripting

.bash_profile problem

Hi Guys, I modified my .bash_profile script , and tried to change the prompt. Following is the line of code in my .bash_profile script. export PS1=" \W " But I get the output as: \W This appears to be my prompt now. Any idea what should be done.. Thanks! (0 Replies)
Discussion started by: nua7
0 Replies

10. UNIX for Dummies Questions & Answers

Unrecognized Path in .bash_profile

Dear experts, I have installed Ruby in the following directory: $ pwd /home/ewijaya/.ruby $ ls bin lib share And I have also stated the PATH in my bash_profile like this: # .bash_profile # Get the aliases and functions if ; then . ~/.bashrc (1 Reply)
Discussion started by: monkfan
1 Replies
Login or Register to Ask a Question