Solved

Linux, su from a script

Posted on 2013-11-19
1
225 Views
Last Modified: 2013-11-19
I normally boot up my RHEL 6.4 instance, and then start the following command

su - mqm

Open in new window


How do I get this to occur automatically upon bootup (in such a way that the su - mqm command will invoke the .profile ?

Thanks
0
Comment
Question by:Los Angeles1
1 Comment
 
LVL 19

Accepted Solution

by:
xterm earned 500 total points
ID: 39660510
I assume you're logging in as root and then su'ing to mqm, but why not just log in as user mqm to begin with and then you do not need to su at all?

If you log in as the correct user, you will automatically get your .profile read.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now