Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-25-2016, 11:31 PM   #1
LQ Newbie
Registered: Oct 2016
Posts: 1

Rep: Reputation: Disabled
pmrun and su question

Hi Members,

I have question regarding pmrun.

I have a script that has to be executed as a user (say abc). I connect to the linux server remotely and i first execute pmrun su - to become root and then i want to execute su - abc.

The issue is when i first execute pmrun su -, it opens up another shell and my following su - abc and other following commands are not executed. How do i fix this?
Old 10-26-2016, 02:13 AM   #2
LQ Guru
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,337
Blog Entries: 3

Rep: Reputation: 3732Reputation: 3732Reputation: 3732Reputation: 3732Reputation: 3732Reputation: 3732Reputation: 3732Reputation: 3732Reputation: 3732Reputation: 3732Reputation: 3732
Originally Posted by viramasu View Post
and other following commands are not executed. How do i fix this?

Which distro are you using and would you consider using "sudo" ? If you look in the manual page for the file sudoers, you will see all the options. But there are also presentations online by Michael W Lucas about "sudo: You're Doing It Wrong" both slides and video. His book, sudo Master is quite useful. No, I don't know him or have even met him, but "sudo" is useful enough that it is worth knowing about but flexible enough that an introduction to its capabilities are needed, beyond what are available in the manual pages, and he covers the topic well.

sudo -u abc /usr/local/bin/someprogram
Where a group is given such permission in /etc/sudoers

%team1 ALL=(abc:abc) /usr/local/bin/someprogram ""
The empty quotes mean that no options are allowed for that program. If you want options, add them or (carefully) use a pattern.

If you're stuck using "su" then use the -c option to specify the program to run.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] GPL question (Version 2, June 1991) - physical media availability question LicenseQuestions Linux - Newbie 1 12-01-2012 06:34 PM
basic html question - download link to files on my webpage question Davno Linux - Server 5 12-25-2009 07:24 AM
linux distro question & mysql install question natalie.aloi Linux - Newbie 5 07-19-2009 08:28 PM
Question, Apples Contribution to Open Source + MacOs file structure question Higgy3k Other *NIX 5 07-25-2005 04:23 AM
login prompt question & kde scheme question JustinCoyan Slackware 2 06-09-2004 02:02 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:38 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration