LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-22-2004, 01:18 AM   #1
leonidas
LQ Newbie
 
Registered: Sep 2004
Posts: 5

Rep: Reputation: 0
command execution


Hi to everyone,
How can I execute a command on behalf of another user while I am logged in as super user? Does anyone has an idea?

Thanks in advance
 
Old 09-22-2004, 01:29 AM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
su <user> -c <command>

works great. To execute multiple commands:

su <user>
command1
command2
.
.
.
exit

remember, you can switch to any user, not just root, using su (of course, if you're not root, you need to known their password).
 
  


Reply


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
command execution time minil Programming 10 08-20-2010 05:59 PM
can I check the execution of this command? kushalkoolwal Programming 1 10-21-2005 09:44 PM
php command execution problem avswamy Programming 3 01-31-2005 05:55 AM
Automatic execution of a command after login openart Linux - Newbie 5 10-29-2004 02:44 AM
Telnet command execution history deadCenter Linux - Newbie 3 05-13-2003 02:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:23 PM.

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