![]() |
how to be a root in ubuntu?
how to be a root in ubuntu?
i wanted to edit a text file in a folder and i can't since i'm not the root so i need to know how to be a root. but how? |
Use the "sudo" command:
Code:
sudo nano /name/of/fileIf you prefer a GUI text editor, use "gksu" (or "kdesu" if you're using Kubuntu) Code:
gksu gedit /name/of/fileWell worth reading this page, as Ubuntu's security model is a little different than many other distributions. |
so i don't need to login as a root?
thanks |
Quote:
|
how bout this..
Quote:
|
Single user mode or any maintenance mode similar to that, and generally doing maintenance... you can do "sudo passwd root" to set the root password, in Ubuntu the root password is made of an unusable password by default what means root can not be logged in as. The only real advantage of sudo in my opinion is that it's usually a time limited idle before it dis-activates and thus needs the password. it's harder for people to break in while you have left the computer... but why would you be leaving the computer unlocked anyway if you were leaving it where other people could get to it? else wise putting sudo infront of something can become so common a lot of people would do the same mistakes with or without sudo anyway... as generally logging in as root as a main user is just ill-advised anyways... and why I prefer "su -".
|
Turf, If you want to enter into /root directory, you will need to login as root user. Try to change the user to root suing sudo command.
sudo su Then enter the password of the user turf. |
Quote:
Code:
cd /rootPlease take a minute to read through the document I linked to in post #2, it should answer many of your questions. You might also want to brush up on some command line basics before you go issuing commands with sudo, here is a good tutorial: http://www.tuxfiles.org/linuxhelp/cli.html |
This is "cheating" I guess, because it's just too easy! But I installed an awesome, ultralight file manager using Synaptic, called PCManFM (one of the jewels of the LXDE project). I use that to navigate to the folder that has the stuff I want to change, and then click on Tools > Open Current Folder as Root. Enter your computer's root password when prompted. Bingo! A new window opens up with a little caption that says, "Warning! You are now in Super User Mode!"
Click on whatever file you want to edit, modify, delete, move, whatever. When you close that Super User window, you're back to "ordinary user" but all your changes are saved. Sweet, huh? Simple enough for even a silly little dixiedancer to do, lol. -Robin |
finally got in by providing a root password this time. i'd like it that way where users need to give the root password. :D
but after getting into the grub,i seem can't see my menu.lst. where the hell are they hiding these things, it seems complicated unlike most distros.where its easy to spot the lilo.conf or the menu.lst |
menu.lst is from grub 1, grub 2 uses grub.cfg and I know Ubuntu (since 9.10) uses grub 2, however I am not certain of the changes you should be making with the grub 2 boot loader so if you could say what you are trying to do, perhaps other users could help you out with that?
|
Quote:
Speaking of the Ubuntu documentation, it is excellent, and they have an entire chapter on GRUB (hint: there is no "menu.lst"): https://wiki.ubuntu.com/Grub2 I know it is tricky when a lot of different people on the internet are shouting conflicting advice at you. When in doubt, I encourage you to look for answers from sites with ubuntu.com in the URL. This will ensure you are getting accurate and up-to-date information. I hope I'm not coming off as a know-it-all... I certainly don't know all the answers! I just know where to look. ;) |
the link really help thanks a lot.
i got my 2nd OS working after creating a bashscript for the OS entry in etc/grub.d/ then i run update-grub seems working now. thanks |
If the sudo command annoys you you could emulate the root login in one of two ways... I can't remember the second but I use the following all the time because 1) I like and use bash to it's easy to remember and 2) when I switch to root user with this method it uses my users .bash_aliases and .vimrc file so I have all of my aliases and settings I want.
Code:
sudo bash |
Quote:
Code:
sudo passwd |
| All times are GMT -5. The time now is 05:03 PM. |