LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 05-11-2004, 08:19 PM   #1
bobbasic2002
LQ Newbie
 
Registered: May 2004
Posts: 2

Rep: Reputation: 0
Question Logging on as root from The Terminal


Hi,

How can I log on as root from "The Terminal" run a script and then go back to my acutal logged in user?

Any help is greatly appreciated.

Thanks,
Bob
 
Old 05-11-2004, 08:30 PM   #2
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
The command su will do this for you.

su
password: (enter the password, nothing will be shown )

To go back to being a normal user type exit.
 
Old 05-11-2004, 08:32 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,004
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Or, instead of su'ing, do this:
su -c "command"


Cheers,
Tink
 
Old 03-16-2014, 07:44 PM   #4
kalidasN
LQ Newbie
 
Registered: Mar 2014
Posts: 1

Rep: Reputation: Disabled
$sudo su
$Enter your password
$

to return to normal user privileges:
$exit
 
  


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
Problem in text based terminal when logging as root MSafty Suse/Novell 3 08-22-2005 04:14 PM
Problem in text based terminal when logging as root MSafty Linux - Software 2 08-17-2005 12:09 AM
Logging into Mandrake 9.2 from terminal fleeced Linux - Newbie 1 08-15-2004 02:05 PM
using red-carpet without logging out and logging as root. packman Linux - Software 1 12-09-2002 03:55 AM
terminal history logging alue Linux - General 4 03-15-2002 02:59 AM


All times are GMT -5. The time now is 05:53 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration