LinuxQuestions.org
Review your favorite Linux distribution.
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 10-10-2005, 06:00 PM   #16
init100
LQ Newbie
 
Registered: Oct 2005
Location: Europe
Distribution: Fedora Core 4
Posts: 20

Rep: Reputation: 0

You are not required to type a dash (-) after the su command to get full root privileges. The dash indicates that you want to start in a login shell, which usually means that the correct PATH will be set up, giving the impression of "full" root privileges. If you omit the dash after su, you will get an ordinary shell instead. It has the same privileges, but since the root user's PATH have not been set up, you might have to use the absolute path to the system administration commands that you want to use. Ordinary user commands, like ls, should work as usual.

The system administration commands are often installed in other directories than the ordinary user commands, usually /sbin or /usr/sbin instead of /bin or /usr/bin. The ordinary users PATH does not include the sbin ones, and su without the dash does not either. If you use su -, your PATH will include the sbin directories in addition to the ordinary bin directories.
 
Old 10-10-2005, 10:15 PM   #17
SkyEye
Member
 
Registered: Sep 2005
Location: Sri Lanka
Distribution: Fedora (workstations), CentOS (servers), Arch, Mint, Ubuntu, and a few more.
Posts: 441

Rep: Reputation: 40
"-" sets the environment variables and stuff (other initializations, usually .profile and rc files).

Means if you just do "su username", you get a session (but without the "username"s environment). If you use "su - username", then you get a session initialized to the "username"s environment. So keep it in mind. Most of the time (not always) you'd like to use su with the tailing "-"

Last edited by SkyEye; 10-10-2005 at 10:17 PM.
 
Old 10-12-2005, 10:29 AM   #18
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
Thought you weren't supposed to become root inside X - for security reasons.
 
Old 10-12-2005, 06:00 PM   #19
edong23
Member
 
Registered: Apr 2005
Distribution: Slackware
Posts: 350

Rep: Reputation: 30
well, it isnt so much security reasons, just for protection of yourself. usually anyway. you dont want to run the system as root ... period. but just get a root term and do the command you need,(like install a program). then get out of root. you dont want to log in as root, and run anything for a period of time.
 
Old 10-12-2005, 07:51 PM   #20
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,243
Blog Entries: 4

Rep: Reputation: 3776Reputation: 3776Reputation: 3776Reputation: 3776Reputation: 3776Reputation: 3776Reputation: 3776Reputation: 3776Reputation: 3776Reputation: 3776Reputation: 3776
XWindows is a very versatile beast. To give just a hint of what can be done, look at http://www.linuxjournal.com/node/7298/print.

And of course there's the XFree86 web-site.

Basically, "yes you can" do a lot of things with this system that are unheard-of in the rather limited world of Microsoft Windows. You can have more than one completely-separate, graphic sessions logged-on at exactly the same time on the same computer, from the same console (or from entirely separate computers).
 
Old 10-14-2005, 10:46 AM   #21
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
Quote:
Originally posted by edong23
well, it isnt so much security reasons, just for protection of yourself. usually anyway. you dont want to run the system as root ... period. but just get a root term and do the command you need,(like install a program). then get out of root. you dont want to log in as root, and run anything for a period of time.
You sure? I'm pretty certain X was deemed insecure in the past - perhaps it's been fixed. Have an idea people can read your keystrokes, so root's password would be at risk. It gave me a warning once that someone might be reading the keystrokes - as a result of trying to copy the MIT magic cookie through the network.
 
Old 10-22-2005, 10:56 AM   #22
mcconnaughey
LQ Newbie
 
Registered: Jul 2005
Location: St. Louis MO
Distribution: Fedora core 3
Posts: 8

Rep: Reputation: 0
I do this by logging in as root on another virtual terminal. To go from a graphical screen to a text screen, use <CTRL-ALT-F1> then log it in if you haven't already and edit the file with nano or whatever you like. To go back to the graphical screen, use whatever <ALT-F#> key has been assigned to that (on my system it's F7).
 
Old 01-02-2008, 01:59 AM   #23
richphoenix
LQ Newbie
 
Registered: Jan 2008
Posts: 1

Rep: Reputation: 0
Lightbulb Limitati..er..."Permissions"

yeah, there are times that I could find the graphical switch that has (User) <---> (Root) and when I want to STAY IN THE GUI, I could just flip the switch and gedit that system file.

I wish someone could explain to me the security risk of the SOLE user on the LOCAL keyboard being aliased as ROOT in a GUI. I really don't think it would take too much effort for a seasoned Linux Programmer to make a rule that states:

ALWAYS ASK FOR ROOT PASSWORD (to video display) FROM LOCAL USER (at keyboard) BEFORE ISSUING A DENIAL. the in and outs CAN be hardcoded.

or...at the ultimate very least, the ability to SAVE the long text file you have made under a different name in the same directory. I can't count the times I've attempted to change a file with 20-30 different changes to be slapped with a "permission denied" eg "I just wasted my time making all these adjustments because it wasn't gonna ask for the root password for me to be able to save the friggin thing"

or..maybe being able to hit the 'SUPER' button on a "permission denied" which would ask for root password and retry request.

So many different GUI solutions that haven't been made
 
  


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
Files removed from file system during Fedora Core Upgrade gryphonavocatio Linux - General 5 09-21-2005 12:27 PM
editing files as user? Groundhog1248 Linux - Newbie 2 11-25-2004 12:28 PM
editing system files paschim Linux - Newbie 2 10-12-2004 08:58 AM
Need some help editing UT 2003 user files. z-vet Linux - Games 2 10-08-2004 09:14 AM
Editing System Files wasabi Fedora 2 06-05-2004 08:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:59 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
Open Source Consulting | Domain Registration