Sudo and Admin not working following Ubuntu install 6.06

Asked by LazyTownRocks

Just installed Ubuntu and am having trouble getting 'sudo' to work as I try to solve other things.

For example in Terminal if I type 'su' I get asked for a password and my own password fails when entered.

I didn't set-up any other password on install.

After looking at simiar posting on this forum I've alrady covered the below;
> I've checked I'm in the admin group and have even booted in recovery mode and tried to add user to admin and get ''user already in admin group" response.
> When I use the GUI and look at 'Places' - 'Computer' - 'File System' - 'mnt' ... I can't create directories and when I look at the 'properties' tab it says at the bottom 'you are not the owner so can't change permissions'.

The install is on a clean PC (blew away MSWinXP ... felt really good that!) the install I used is 'Linux Format Issue Seven' Ubuntu installation on x3 CD's and I've since installed all the updates too (200+).

Other than the above and not being able to mount me external HD (HAL tiacket 3757 just updated), all is well and I really want to crack these to make the complete break from the dreaded MSW!

Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Tony Arnold
Solved:
Last query:
Last reply:
Revision history for this message
Best Tony Arnold (tony-arnold) said :
#1

Are you typing 'su' or 'sudo'? 'su' will not work as expected on Ubuntu as that requires the root password and there is no root password on Ubuntu.

To run a command as root, then you need to use the sudo command. E.g.,

   sudo some-command

It then prompts you for your own password.

Which users can use the sudo command is controlled by the file /etc/sudoers. The first user added during installation should be added to this file automatically.

Revision history for this message
LazyTownRocks (steve-arite) said :
#2

You've both solved my problem and educated me, appreciated..

I am now using 'sudo' and not 'su' and yes the first user was added automatically.

Thanks.

Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) said :
#3

I recommend you read the following page which outlines how to use sudo and why Ubuntu uses it:-

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

Revision history for this message
Sergio Ribeiro (sergio-alfred-ribeiro) said :
#4

The command <su> is the super user command and it requires the root password that you have set. Whenever you start up and configure a UNIX/Linux machine the root user (most powerful user that can do anything) password is encrypted until you set it to something. This is a distinctive feature of UNIX/Linux systems. Windows just leaves the administrator password blank. You can dodge this loophole of the <su> command by just doing <sudo -i>, it will then prompt you for your own password. Let us say for this example our root password is simply "root" (without quotes), and let's say your user account password is "beefstew".
>$ su
     Password: root
># "You are now the root user" (It doesn't actually announce that only the end prompt changes from $ to #)
To dodge this obstacle do this
>$ sudo -i
     Password: beefstew
># "You are now the root user"