LinuxQuestions.org
Visit Jeremy's Blog.
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 05-27-2012, 07:25 PM   #1
Nguha
LQ Newbie
 
Registered: May 2012
Posts: 1

Rep: Reputation: Disabled
Question gaining permission at root in fedora 16


How do you gain permission at 'root' level in fedora 16
 
Old 05-27-2012, 07:34 PM   #2
em31amit
Member
 
Registered: Apr 2012
Location: /root
Distribution: Ubuntu, Redhat, Fedora, CentOS
Posts: 190

Rep: Reputation: 55
your question quite unclear, what do you mean by 'root' level ? are you here trying to doing su to root ?

or you can configure sudo access too.

Code:
#su - 

#su - root
either you can add a another user which have root access.
 
Old 05-27-2012, 07:46 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by em31amit View Post
....you can add a another user which have root access.
That strikes me as the hard way---why not just us "su" to switch to the root account?

To the OP:
If you set up the machine, then you provided a "root" password as part of the process. If someone else set it up, then they can give you the password.
 
Old 05-27-2012, 08:21 PM   #4
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Quote:
That strikes me as the hard way---why not just us "su" to switch to the root account?
But if a user login using "su" he/she would not be able to run some of the commands, for an example "ifconfig" and he/she will get the following error -
bash: ifconfig: command not found

su gives the particular user root permission but does not change the PATH variable and current working directory. So, the user will not be able to execute command in /usr/sbin/ directory.

su - changes the root permission, PATH variable and current working directory which allows a non-root user to execute all commands.
 
Old 05-27-2012, 11:41 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,822

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
for most things fedora is going to need the " su - "
if you try to launch say Nautilus with just" su" YOU WILL get an error
 
Old 05-28-2012, 02:45 PM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by Satyaveer Arya View Post
But if a user login using "su" he/she would not be able to run some of the commands, for an example "ifconfig" and he/she will get the following error -
bash: ifconfig: command not found

su gives the particular user root permission but does not change the PATH variable and current working directory. So, the user will not be able to execute command in /usr/sbin/ directory.

su - changes the root permission, PATH variable and current working directory which allows a non-root user to execute all commands.
I don't think so...

If I am not mistaken, "su" means switch to root---with all privileges. The only difference whne using "su -" is that it puts you into root's home directory.

This illustrates:
Code:
[mherring@herring-lap ~]$ whoami
mherring
[mherring@herring-lap ~]$ su
Password: 
[root@herring-lap mherring]# whoami
root
[root@herring-lap mherring]# su -
[root@herring-lap ~]# whoami
root
[root@herring-lap ~]#
 
Old 05-28-2012, 03:26 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,822

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
Quote:
The only difference whne using "su -" is that it puts you into root's home directory.
not quite

su -
uses the ROOT $PATH

su
uses the users $PATH

now they can be VERY VERY different or not much different depending on the set up
but sbin in in root $PATH and IT IS NOT in the users $PATH
 
Old 05-28-2012, 06:52 PM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Actually, there are other env vars that change eg SHLVL, USER, LOGNAME,

'_'
for 'su; _=/etc/bashrc
for su -; _=PATH

and so on...

Basically, I always assume that su gives you root but with non-root (ie orig user) env; 'su -' gives you complete root env.
 
Old 05-28-2012, 08:19 PM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
My mistake---yes--"su -" gives you root's environment.

The key thing is that all forms of su give the same **privileges**
 
  


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
Preferred use of sudo for root-gaining Kenny_Strawn Ubuntu 60 12-03-2010 09:37 AM
Gaining root access to file manager Rick069 Linux - Software 2 04-27-2007 11:24 PM
gaining root access thebiggiantmouse Ubuntu 5 09-19-2006 04:53 AM
Gaining root access in Gnome jonasan Linux - Software 5 01-31-2006 12:11 PM
Gaining root access in KDE d-katz Linux - General 9 02-27-2004 06:46 AM


All times are GMT -5. The time now is 08:27 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