LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   log in as root (https://www.linuxquestions.org/questions/linux-newbie-8/log-in-as-root-708884/)

lelieng 03-03-2009 02:16 PM

log in as root
 
I have Ubuntu 8.10 and try to log in as root with su and password, but get the message "Autentiseringsfeil" (norwegian). What is wrong?

Tinkster 03-03-2009 02:29 PM

Hi, welcome to LQ!

Ubuntu by default doesn't have a root account enabled; did you change
that in the first place? If you want to become root on ubuntu normally
you'd go "sudo -i" and type your own password.



Cheers,
Tink

rizwanrafique 03-03-2009 05:50 PM

To login as root when root user is disabled use:

Code:

sudo -s

minaesm 03-04-2009 03:59 PM

i have also an ubuntu8.10 paltform , i want to install a package from the source called hdf5 which is needed to run another program but when i unzipp it and i want to change a file in the folder it says that i do not have the access to change it , i tried sudo -s but again the same problem happend
what can i do to become root to change the file

kyle_p 03-04-2009 04:49 PM

as lame as i find this you can actually get into root with this whacky command:

Code:

sudo su
At which point you can set your root password with

Code:

passwd

minaesm 03-05-2009 12:45 AM

there are folders which i want to delete from my desktop but i cant

kapilbajpai88 03-05-2009 01:40 AM

Hi There,
In case you want to delete something but it is not allowing you to delete files, then either check permissions on the files, or use the switch -rf for remove command, i.e,
rm -rf <file name>


Quote:

Originally Posted by minaesm (Post 3465390)
there are folders which i want to delete from my desktop but i cant


minaesm 03-05-2009 01:50 AM

the permission is root and i also tried that rm -rf but again the same message appeared .

kyle_p 03-05-2009 08:51 PM

Quote:

Originally Posted by minaesm (Post 3465447)
the permission is root and i also tried that rm -rf but again the same message appeared .

This is one of the major reasons I dislike Ubuntu. Is it really too hard to use su -c 'cmd' ??? Or set a root passwd and still make the 1st user a full sudoer by default???

Thats just my two cents; sorry for the rant. Back to your issue...

sudo su -

Will get you into root. Then you may use rm -rf on that directory as the previous poster suggested. And I will warn you in case you don't know; root and rm -rf although needed can be very harmful to the integrity of your system so think before you type. :)

mcsaky 03-06-2009 12:50 AM

Hey try this.

Code:

sudo passwd
This should allow you to set the password for root. Then if you still have problems removing the file in X try opening a terminal head to hrm, /home/username/Desktop ? and

Code:

sudo rmdir directoryname/
It should ask you for the same password as you entered in the sudo passwd command above.

I did this and it worked fine for me. Hope it works for you.

Junior Hacker 03-06-2009 05:47 AM

Traditionally, the 'rmdir' command does not work if the directory is not empty. You have to do 'rm -rf' instead. With Ubuntu, which was designed for families with exploratory children, you may be allowed to do it with sudo, (sudo rm -rf directory), if the administrator allows you to do so.

If you don't like the extra typing involved with sudo, install Debian....if the administrator will allow you to do so.

If you're stuck with Ubuntu because your a child under a parent's control, type 'sudo' once and a while and hit enter, you'll get an error or nothing, but at least you don't have to type it at every command, all you have to do is hit the up arrow key to go through the bash_history of past commands till it shows up, then add the root command you're allowed to use, and you'll save having to type those extra four letters...since you're lazy enough to complain about it.


All times are GMT -5. The time now is 07:14 AM.