Solved

Linux, su from a script

Posted on 2013-11-19
1
219 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

758 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

18 Experts available now in Live!

Get 1:1 Help Now