editing a file as root

Asked by Robin Wingrove

Hi

I've just installed Ubuntu after a colleague gave me the magazine LinuxFormat which promised me that installation would be easy. Thankfully, I have previously played around with Linux starting around Red Hat 4 but usually, because of work, have had to stay with MS. I say thankfully because the mag didn't even warn me that I had to create a swap partition - reading from it I assumed that Ubuntu, like Novell (so I hear) created a swap partition on the fly while installing it. Wrong! Therefore, back to Windows & Partition Magic, create a 1gig swap file and then back to the install.

To get to the point. I have been trying to get my ADSL connection up & running. I have used the following commands to install it
sudo ifconfig
sudo apt-get install pppoeconf
sudo pppoeconf
sudo pon dsl-provider

At this point I get a message
(I am posting this from Windows so the next is from a very faulty memory)
the line in /etc/ppp......./provider
/dev/modem
is not a valid command

Anyway, I have opened up the file /etc/......./provider and have tried to comment out the line /dev/modem using the # comment indicator. However, when trying to save I am not being allowed as I don't have the priveleges.

Question: How does one save this amendment? I thought that I would have to login as root (as in older LInux distros) but when attempting this was barred as my install password is only good for my (non root) account.
Just as important, is this line the reason why my connection is not working?
Can one log in as root? If so, how?

Lastly, from left field. As an old Office (MS) developer, one of the first things I did when in Ubuntu was to look at the code in Open Office macros (so far, only the Word Processor). While it looks very similar to what I have spent years doing in MS, there does appear to be some differences. Can anyone recommend books/documentation etc that can guide me?

Thanks

Robin

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) said :
#1

Ubuntu uses the sudo command to grant root access to normal users temporarily rather than explicitly logging in or changing to the root user. It's explained here:-

https://help.ubuntu.com/community/RootSudo

So to edit the file you might do:-

sudo gedit /etc/foo/bar/baz (or whatever the file is called)

If you were working on the console and didn't have a GUI such as GNOME or KDE open then you might use:-

sudo nano /etc/foo/bar/baz

Ubuntu *does* setup a swap partition by default, I don't know why it didn't in your case.

If you want to post the entire contents of that file for us to look at you could paste it to a pastebin such as the one linked below, with any sensitive information blocked out:-

http://paste.ubuntu-nl.org/

Of course you may need to copy the file to a USB disk to get it to your windows partition to be able to do that until your internet connectivity is working. Alternatively you can use the following driver under windows to enable you to read the Ubuntu ext2/3 partition directly:-

http://www.fs-driver.org/

Revision history for this message
williamts99 (williamts99) said :
#2

Were you following https://help.ubuntu.com/community/ADSLPPPoE or information from the magazine?

Also, have you tried running

pon dsl-provider

without the sudo before it?

Can you help with this problem?

Provide an answer of your own, or ask Robin Wingrove for more information if necessary.

To post a message you must log in.