LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 04-14-2009, 12:14 PM   #1
Azazwa
Member
 
Registered: Mar 2009
Distribution: Fedora 8, Ubuntu 9.10, SuSE 10, Fedora 14
Posts: 98

Rep: Reputation: 15
How to become root on gnome FC 8 without use of terminal.


Hi!

How do I get root priviledges from a gnome session without the terminal when I am logged in as a normal user?

This is what happended. I tried to make a .sh file in /etc/profile.d using the cat command in the terminal, but I had the syntax wrong, and out of sheer ignorance and frustration I closed the terminal. The problem is that I created that file as root, and now I can't delete it as a normal user, and I can't open a terminal to become root because this .sh file is blocking it. Also, a while ago, when I tried to log in as root from the normal graphical screen, I couldn't open a gnome session, but only got twm. This might have changed by now, I haven't tried it yet, but does anyone have any other ideas on how I could fix this? I tried to ssh from another computer and delete the file, but it just says "command not found" at every line of the .sh file as output on the remote computer.

Thanks!
 
Old 04-14-2009, 12:32 PM   #2
maresmasb
Member
 
Registered: Apr 2009
Posts: 108

Rep: Reputation: 24
When logging in as root via the graphical login you should be able to select what window manager to use. Your last root login seems to have used twm, because the last know choice is the default for the next time.

Even so, twm is perfectly enough to launch a shell as root and then changing file ownership or permissions, or deleting it.

You also have the option to launch a system from a LiveCD, remount your hard disk as writeable and do all kinds of changes.

Last edited by Tinkster; 10-30-2010 at 03:25 PM.
 
Old 04-14-2009, 01:11 PM   #3
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
You could also just switch to a virtual terminal (ctrl-alt-F6?), login as root, make changes, logout, switch back to normal (ctrl-alt-F7). It has been a while since I have done this so the details are a little fuzzy.
 
Old 04-15-2009, 03:47 AM   #4
Azazwa
Member
 
Registered: Mar 2009
Distribution: Fedora 8, Ubuntu 9.10, SuSE 10, Fedora 14
Posts: 98

Original Poster
Rep: Reputation: 15
Thanks for the advice.

maresmasb,
how do I launch a shell as root from twm?

lazlow,
I tried to switch to a virtual terminal (ctr-alt-f6) but it doesn't accept my root login. It has the right password, but then just seems to "jump" out again.
It's something like this:

server login: root
Password: mypwd
Then it flashes something about the last login, and returns to
server login: _

maresmasb,
As for the option with the LiveCD, could you perhaps give me more detail or refer me to a tutorial? I'm very ignorant about computers, and therefore quite dangerous, as can be seen by what I've already done to my own system. Sigh...

Is there a way in which I could give my normal user root priviledges (by way of the GUI), so that I can delete the file?
 
Old 04-15-2009, 07:07 AM   #5
maresmasb
Member
 
Registered: Apr 2009
Posts: 108

Rep: Reputation: 24
A mouse click on the desktop (either the left or the right mouse button - not so many choices here) will bring up the twm menu where you can launch a shell. As a matter of fact, twm usually has one running by default, though this depends on its startup file.

A LiveCD or RescueCD will usually mount existing partitions. Run 'df -h' to see what is mounted currently. Run '/sbin/fdisk -l' as root to see what partitions do exist.
Mounting a partition goes like 'mount -t ext3 /dev/sda3 /mnt', when remounting an already mounted device to switch to write-enabled mode add the '-remount rw' option as well. Device names and mount location will be different for your system If you ue LVM volumes, then you will need a completely different approach.
 
Old 04-15-2009, 08:24 AM   #6
Azazwa
Member
 
Registered: Mar 2009
Distribution: Fedora 8, Ubuntu 9.10, SuSE 10, Fedora 14
Posts: 98

Original Poster
Rep: Reputation: 15
[Solved]

Hi!

Thanks for your advice.
I didn't see your last post until I managed to fix the problem.
I used the fedora install CD and rebooted the machine from the CD, and choose the "rescue installed system" option or something like that. Then it asked questions about language and the type of keyboard for which I chose the defaults, and whether I wanted to set-up/start the network interfaces. I said no. Then it said that my installation would be mounted under /mnt/sysimage and that a shell would be opened. If I wanted to work as root I should issue the command chroot /mnt/sysimage.

I did that, and could delete the troublesome .sh file.
I exited the shell by typing "exit" and rebooted the computer from the hard drive.

I have never before been so glad to see a terminal!

Thanks!
 
Old 04-15-2009, 12:52 PM   #7
maresmasb
Member
 
Registered: Apr 2009
Posts: 108

Rep: Reputation: 24
Glad to see someone becoming euphoric by seeing a terminal. Most people are scared to death, when they meet one :-)
 
  


Reply



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
How do I resize the terminal window from the command line in the gnome terminal QuIcKSpArK Linux - Newbie 5 04-21-2012 02:04 PM
root password not recognized in Gnome terminal anri Linux - Newbie 3 05-25-2007 06:27 PM
pressing 'x' in gnome terminal starts new terminal instance Drwfan54 Ubuntu 3 09-26-2006 03:09 PM
Alternative terminal to konsole & gnome-terminal Adony Linux - Software 3 10-08-2004 03:59 AM
Gnome-Terminal non root issues natto34 Linux - Software 6 07-15-2002 10:08 PM

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

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