LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Root password problems (https://www.linuxquestions.org/questions/linux-newbie-8/root-password-problems-451478/)

Omnutia 06-04-2006 09:00 AM

Root password problems
 
Having got ubuntu working on a dual boot with windows 2k ive changed my bulk storage partition (I have one 60gb part for mass storage then 5gbs for each OS so if one dies then it dosnt mean reformating.) and after going through the process of borrowing paragon partition manager (took long enough, was this close from using bittorent.) I find that I have to mount it (though I think I unmounted it somehow.)
Now I have used comand prompt to try and get it back but the
Code:

mount /dev/hda1/ /media/winos/
gives me the response "only root can do this". After a quick search I discovered the sudo root and passwd root commands and set a password for my root which i entered and woe of woes it gave me "command not recognized", then continued to do this untill I restarted. Now if I enter a wrong password it comes up with "password:" again so:
Why is it that this one password (which I think is correct) is causing this error?
am I suposed to follow "sudo root" with the command I want to use on the same line?
and is there an easier way to mount this drive without resorting to phlak? (which may return the errorus password as the actuall root password.)

Lenard 06-04-2006 09:26 AM

I can tell you what I did to overcome this, this applies to the Red Hat family and may be a bit differnt for ubuntu. First make sure you have the device configured in /etc/fstab, example;

Code:

/dev/hda1    /media/winos    auto    exec,noauto,user,ro,umask=0 0 0
Then make sure you (the user) is in the /etc/sudoers file with the rights to use both mount and umount, example;

# Samples
%lenard ALL=NOPASSWD:/bin/mount ,/bin/umount

Notice the path is specified, it might be a good idea to also give yourself this path in your .bash_profile file (for example if needed). You may have to create a wheel group and add yourself to this group also.

$ mount /dev/hda2

$ ls -al /media/windowsxp
total 1376905
dr-xr-xr-x 1 root root 8192 May 31 08:36 .
drwxr-xr-x 7 root root 4096 Feb 5 16:09 ..
dr-xr-xr-x 1 root root 0 Apr 22 10:46 3a32
dr-xr-xr-x 1 root root 0 Feb 10 15:21 Acer
-r-xr-xr-x 1 root root 150528 Jun 19 2003 arcldr.exe
-r-xr-xr-x 1 root root 163840 Jun 19 2003 arcsetup.exe
-r-xr-xr-x 1 root root 0 Feb 10 14:02 AUTOEXEC.BAT
dr-xr-xr-x 1 root root 0 Feb 11 09:31 bcd
-r-xr-xr-x 1 root root 192 Feb 10 13:59 boot.ini
<snip, you get the idea>


$ umount /dev/hda2

Omnutia 06-05-2006 11:08 AM

Im going to keep looking for a solution as Ive not had much experience with the terminal and by the looks of it I would probably loose the hard drive if I tried that. Thanks anyway, any links to that each of the "dr-xr-xr-x" etc... means? Im only just getting into copying files and directories.
Well thanks again, anything simpler?

bgbranko 06-11-2006 04:47 PM

Quote:

Originally Posted by Omnutia
Now I have used comand prompt to try and get it back but the
Code:

mount /dev/hda1/ /media/winos/
gives me the response "only root can do this". After a quick search I discovered the sudo root and passwd root commands and set a password for my root which i entered and woe of woes it gave me "command not recognized", then continued to do this untill I restarted.

You don't need a root password in Ubuntu. Ubuntu gives your user the full admin power via sudo command. You type

Code:

sudo *command*
and then type YOUR OWN USER PASSWORD. Basically, it boils down to this way of working being more secure and stuff, something I know little about.


All times are GMT -5. The time now is 02:55 AM.