top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Run Script at Login in a Linux System?

+3 votes
348 views

Probably is simple and silly question, I should have googled but still want to ask.
I want to run a script at the login to the Linux system, what is the best way to achieve this.

posted Nov 22, 2013 by Sanketi Garg

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

This should go in your .profile, .bashrc, or whatever they are calling it for your shell in your home directory.

answer Nov 22, 2013 by Majula Joshi
Similar Questions
+2 votes

we are connecting to oracle using korn shell scripts, which use sqlplus to connect to oracle. the oracle database is on the same Solaris box. Currently, we are storing oracle user id and passowrd (plain text) in a file in the .ssh folder of the connecting user, with 400 permission bits.

The DBAs are objecting to this way of working, citing the fact that we are using plain text password for authentication. When we offered that we'd encode the password using base64, they still didnt like the idea, citing that we'd still decrypt the password in the shell script and transmit the password over network.

Now, I want to understand this-

I have been reading that oracle encrypts/hashes the password string, before transmitting it. I cant find the reference right now though, however, I still want to confirm my understanding. Is it really like this ? we are on 11g r2, would that make a difference ?

would i be able to login to sqlplus without decrypting the password hash ? e.g. DBAs set a password, pass on the hash to me. I put that in a file, and supply to sqlplus as a parameter. Is there some way by which this kind of authentication work ? I know some tools do allow that, if you encode using their tool, they are able to decrypt the value and use it for authentication. does oracle ??

Help me fellas..

+1 vote

I am now focusing on the development of a script interpreter (some thing like shell) in embedded environment, and its functions mainly output the data in specified address. In order to make it seems better, I want to format the output result like MySQL output listed below for example

||+--------+-------------+
| address| value |
+--------+-------------+|
| 0x1110| 0x01 |
+--------+-------------+
| 0x1111 | 0x00 |
+--------+-------------+|

I think it seems good like this, but I do not know how to make out it.(someone says awk, sed may help, but the environment does not permit it). Is there some libs or tools can help make output result good and elegent?

+3 votes

What is the difference between VB script and java script?

+1 vote

I have to change IP numbers across a number of virtual and physical machines because of network center move. This has to be done before network startup, of course. I'm thinking about the best method to do this.
Where should I include/init this script? Or would it rather make more sense to do this on the last shutdown?

Changes largely involve removing old files and putting new files in place (resolv.conf, hosts, sysconfig/network + network-scripts, firewall, postfix, httpd etc.). The only other change besides replacing files would be changing the IP address in a webcontrol interface in a MySQL table, so this part has to be done after MySQL startup.

Could be run-once or have to disable manually after successful startup.

...