getting rid of ubuntu without reformatting

Maz, Wed Apr 26 2006, 03:04AM

i installed ubuntu on my secondary 160gb drive and i am displeased with it. when i first installed it, it said that my x server was bad or something. so i left it alone not thinking about it. i installed it on a smaller drive to troubleshoot and found the appropriate sudo command to have it work.
too bad i forgot the password to the first install. angry
so how could i rid myself of the space and possibly try again?
Re: getting rid of ubuntu without reformatting
Desmogod, Wed Apr 26 2006, 03:21AM

It must have had a bad install, because Ubuntu tends to be pretty solid.
Just throw your Ubuntu CD in and re-install it again. Don't forget the Ubuntu forums either.
Re: getting rid of ubuntu without reformatting
..., Wed Apr 26 2006, 03:33AM

like desmo said, just run the CD again...

If there are partitions that you want to keep, when given the partition menu you select 'manually configure partition table' then select the partition you installed it on in the firt place, select the 'do not format this partition' so it says 'yes, format it', change the mount point to / , and change the other partition(s) to where you want them. The you click the 'save changes' or whatever it is to go on to the next screen. Now you must check VERY CAREFULLY, and make sure the partitions you want to keep are not listed as the ones going to be partitioned; make sure it is just the / and swap that are going to be partitioned, or go back and figure out what you did wrong.
Re: getting rid of ubuntu without reformatting
Liam, Wed Apr 26 2006, 05:38PM

Ubuntu is pretty much foolproof. Really, my only complaint is the lack of a "real" root account. During install, Ubuntu does make a root account (of course), but the password is set randomly. In order to set the password, just type "sudo passwd" and enter your desired password.
Re: getting rid of ubuntu without reformatting
Desmogod, Thu Apr 27 2006, 01:15AM

The "problem" with the root account is only really a problem if you have been using *nix for a while.
For a windows user swapping over to Ubuntu, It really makes things a lot safer for the user (inability to really mess things up).
If you are a Unix veteran, and need a root account in your life, then it is pie to set one up.
Don't forget that Ubuntu is safer than a windows install, because on a standar Windows box, you are root all te time.
Not good.
Re: getting rid of ubuntu without reformatting
Steve Conner, Thu Apr 27 2006, 09:27AM

That's not true with Windows XP. It's quite like nix in that it allows multi-users some of whom have adminstrator privileges. I hate it when I'm trying to tweak a computer at work and have to go and find an administrator because my account doesn't have privileges. sad

It's true that the default configuration of XP has one user who is, effectively, "root". But I have used it nix style with an admin account that I log into for messing around with things, and an ordinary user account for day-to-day work. It works fine unless you're plugging and unplugging a lot of weird USB things :(

When you enter "sudo passwd", won't the sudo command ask for the existing random root password? I bet it does, otherwise anyone could use sudo to make themselves root any time. Are you supposed to know the random password? Or does it let you do it once only?
Re: getting rid of ubuntu without reformatting
Liam, Thu Apr 27 2006, 10:32AM

No, you're not supposed to know the random password. I did it, and it worked, and it confused me because I thought exactly the same thing. Ubuntu never asks for a password when you use sudo so that you can do thinks like "sudo mount..." so I figured sudo passwd would work, and it did amazed
Re: getting rid of ubuntu without reformatting
..., Thu Apr 27 2006, 02:02PM

That is odd, the sudo password was the password I set up for the user account when I installed it...
You would do sudo whatever, then the first time it would ask for a password, then it would carry out the task as root. It only asks for the password every few minutes.

I would also say that a lot of xp users would benefit from using a limited account and using the 'run as' to installl stuff. That is what I do, and without virus software I have been virus free for years :)
Re: getting rid of ubuntu without reformatting
Avalanche, Thu Apr 27 2006, 02:54PM

On my Slackware box, I think the root has to set up some sort of permission list for people allowed to use sudo.

I tried using sudo to install my graphics drivers, and got 'not in permissions list, reported' (or something along those lines) amazed

Re: getting rid of ubuntu without reformatting
Alex, Thu Apr 27 2006, 07:11PM

wrote ...
When you enter "sudo passwd", won't the sudo command ask for the existing random root password? I bet it does, otherwise anyone could use sudo to make themselves root any time. Are you supposed to know the random password? Or does it let you do it once only?
Well, in order to set the root password, you have to use sudo (sudo passwd, as was stated earlier), and in order to use sudo, you have to know the password (the first user/admin user's password)... So not "just anyone" can do it.
Re: getting rid of ubuntu without reformatting
krenshala, Fri Apr 28 2006, 08:31PM

I haven't use Ubuntu, but there is a sudo'ers list somewhere on the system that specifies what users can use sudo. If you are not in the list it ignores your command. If you are in the list, it runs the command. Usually, it asks for your password the first time you run sudo, and then remembers it for the next X minutes, resetting the timeout every time you run a sudo command. When the timeout expires, it asks for the password again the next time you use the sudo command to run something.

Since passwd assumes the current user if you don't specify one (passwd <username>), and the sudo command is to allow a "normal" user to run a command as root, then "sudo passwd" tells it you want to (re)set the root password.

Another fun thing is to run "sudo bash" (or whatever shell you prefer to use). You can then run whatever commands you want as root, then type "exit" when you are done to close the shell. Sometimes that is much easier than running a bunch of commands with sudo in front of them.