PDA

View Full Version : [ubuntu] Accessing folders as root



le singe
July 19th, 2008, 07:36 PM
Hello again.

Trying to delete a particular folder, when I select "move to trash" I get an error telling me the "device or resource busy." Looking at the permissions under its properties I see that the owner is root and "you are not the owner, so you can't change these permissions."

I think all I need to do in order to delete it is either login as root or do a sudo root thing. If I restart under "restore mode" will I then have root access? I read as well in another post that in the console "sudo -i" will work, so if I type this will I have root access across the board, or is this specific to the program you want to open?

Can I mess anything up loading in "restore mode?" I can be careful...

neurostu
July 19th, 2008, 07:44 PM
Yes if you reboot in restore mode then you are logged in as root.

Its easier to just open a terminal and use the following commands:


sudo - do as root
rm - remove or delete
rmdir - remove directory (only works if the dir is emptry)


REMEMBER sudo rm -rf <dir> : this will completely remove a directory... be very careful with this command as it can be used to cause permanent damage to your system.

sisco311
July 19th, 2008, 07:50 PM
or open the file browser as root:

gksu nautilus
be very careful with this too.

maybeway36
July 19th, 2008, 08:28 PM
Rule of thumb: always add -v to rm, so you know what's going on.

daimaru
July 19th, 2008, 08:42 PM
Yes if you reboot in restore mode then you are logged in as root.

Its easier to just open a terminal and use the following commands:


sudo - do as root
rm - remove or delete
rmdir - remove directory (only works if the dir is emptry)
REMEMBER sudo rm -rf <dir> : this will completely remove a directory... be very careful with this command as it can be used to cause permanent damage to your system.

if u try to remove a directory that is not empty use -r parameter for recursive

sudo rm -r foldertodelete

rockerphil
July 19th, 2008, 08:57 PM
any of the former suggestions will work, but here's what i found easiest when performing root tasks. open up a terminal and run this

[snip]

that will allow you to set the password for the actual "root" user accoutnt, so just go through the questions it asks you, then once done log out of your account and you'll be able to log in as user "root" with the new password you set. this will give you unrestricted access to the system. hope this info helps,

Phil

Vakman
July 19th, 2008, 09:01 PM
I agree with Rockerphil. That certainly is the easiest way, I also find.

sisco311
July 19th, 2008, 09:02 PM
any of the former suggestions will work, but here's what i found easiest when performing root tasks. open up a terminal and run this

(command deleted)

that will allow you to set the password for the actual "root" user accoutnt, so just go through the questions it asks you, then once done log out of your account and you'll be able to log in as user "root" with the new password you set. this will give you unrestricted access to the system. hope this info helps,

Phil

Forum policy on log-in-as-root tutorials (http://ubuntuforums.org/showthread.php?t=765414)

daimaru
July 19th, 2008, 09:06 PM
any of the former suggestions will work, but here's what i found easiest when performing root tasks. open up a terminal and run this

sudo passwd

that will allow you to set the password for the actual "root" user accoutnt, so just go through the questions it asks you, then once done log out of your account and you'll be able to log in as user "root" with the new password you set. this will give you unrestricted access to the system. hope this info helps,

Phil
guys that means you are enableing root, which might be a security risk. [snip - root login unsupported]

it is still better to leave the root login and use

sudo -i
instead, which drops you to the root prompt but does not setup a root account.
for grafical folder access as root use

gksu nautilus

rockerphil
July 19th, 2008, 09:07 PM
much apologies, i do try to keep up with forum policies and standards, but was unaware of that particular policy, i'm simply accustomed to logging in as user root for certain administrative tasks, but thank you for informing me of my mistake, much regards,

Phil