LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 03-23-2004, 04:03 AM   #1
aaronruss
Member
 
Registered: Mar 2004
Posts: 90

Rep: Reputation: 15
Question Su Command


When I am logged in as a user and use the SU command in the console. it will not allow me to do every thing I can as root.

I thought su maid a user root.

Example:

I use su and issue the command "service network restart"

I get an error but if I login as root and issue the same command it restarts my network service.

Why can't I restart the network service using SU command?

OS = Fedora core1
Desktop = gnome
 
Old 03-23-2004, 04:09 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Because you use su, and not su -

That way you preserve your own environment,
and root's $PATH that contains various /sbin
directories doesn't get used....

man su
for details...


Cheers,
Tink
 
Old 03-23-2004, 10:38 AM   #3
bigjohn
Senior Member
 
Registered: Jun 2002
Location: UK .
Distribution: *buntu (usually Kubuntu)
Posts: 2,682
Blog Entries: 9

Rep: Reputation: 45
And if you find the manpages a bit to "techno speak" there's a link on how to interpret them in my sig.

regards

John
 
Old 03-23-2004, 05:44 PM   #4
aaronruss
Member
 
Registered: Mar 2004
Posts: 90

Original Poster
Rep: Reputation: 15
Thanks

I checked the man pages and info pages and found the switches for the SU command.

I used "SU -l" and the root password it allowed me to restart the services.
 
Old 03-23-2004, 06:56 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Of course it does, didn't you trust me? :)


Cheers,
Tink
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a single command to list all hardware installed (command line)? davee Linux - Hardware 6 02-28-2009 08:19 PM
Require Linux/Perl equivalent command for windows Command alix123 Programming 7 08-19-2005 03:23 AM
Key stroke/command to shut down x and go into the command prompt screen? Fear58 Linux - General 1 07-14-2004 08:14 PM
Command to display whole filestructure hierarchy f/ command line? mjewell Linux - Newbie 10 01-19-2004 11:48 AM
Where is Command line utility for Cups and command tutorial mossy Linux - Software 8 01-16-2004 01:24 AM


All times are GMT -5. The time now is 02:01 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration