LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to become root on gnome FC 8 without use of terminal. (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-become-root-on-gnome-fc-8-without-use-of-terminal-719058/)

Azazwa 04-14-2009 12:14 PM

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!

maresmasb 04-14-2009 12:32 PM

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.

lazlow 04-14-2009 01:11 PM

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.

Azazwa 04-15-2009 03:47 AM

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?

maresmasb 04-15-2009 07:07 AM

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.

Azazwa 04-15-2009 08:24 AM

[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!

maresmasb 04-15-2009 12:52 PM

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


All times are GMT -5. The time now is 09:54 AM.