[Linux] Ubuntu 7.10 and su or sudo
Lawrence Kagan
linux@flux.org
Sat, 12 Jan 2008 09:01:38 -0500
--Apple-Mail-2-648482374
Content-Type: text/plain;
charset=US-ASCII;
format=flowed;
delsp=yes
Content-Transfer-Encoding: 7bit
Lou is right in that when using sudo you have to use YOUR normal user
password. However, there is a little trick where you can become the
root user without setting a root password. It's 'sudo su'. It will
ask for your normal user password and then put you in a new shell
process owned by root (ie: you are now root). The only time I really
find this convenient is when you are typing chains of commands that
require root privileges or permissions to privileged files either
through piping, redirection or 'tee'. But those instances are few and
far between.
If for some reason, you can't sudo properly:
- Boot into your Ubuntu live CD/DVD
- Mount your filesystem that is on your hard drive (mkdir /mnt/
HardDrive; mount -t ext3 /dev/sda1 /mnt/HardDrive #sda1 may be
different on your system.)
- Type this in a shell: gedit /mnt/HardDrive/etc/sudoers
- Ensure this line is in there: %admin ALL=(ALL) ALL
- Then save and close the file.
- Then open up the groups file: gedit /mnt/HardDrive/etc/group
- Ensure you are part of the admin group by looking for the following
line: admin:x:114:larry # Your group number (114) and username will be
different
- Save the file
- Exit the Live CD and boot back into hard drive installation as normal.
Hope this helps.
Larry Kagan
Superiocity, Inc.
www.superiocity.com
Join the PHP Contractor Network
On Jan 12, 2008, at 5:34 AM, lou wrote:
> You don't say what you tried or if it ever worked but Ubuntu is a
> "little different" in this area. When you do a sudo, it wants YOUR
> password, not the root password (there isn't one by default). If you
> wan to use su to switch to root, you have to set a password. You can
> do this by:
> sudo passwd root
> It will ask for your password and then ask you to enter a root
> password twice. After that, you can use su, just like the big kids :)
> Many of the Ubuntu gurus see doing that as a security exposure.
> Dummies like me see it as overcoming an inconvenience.
>
> Lou
>
> Will Nett wrote:
>>
>> Ok folks, I'm not losing my mind here, but I cannot su or sudo in
>> Ubuntu 7.10... password is rejected. Any help here? Install is a Dell
>> Inspiron 9300, and everything looks like it's installed correctly,
>> but
>> su or sudo is seriously pissing me off.
>>
>> - Will
>> _______________________________________________
>> Linux mailing list
>> Linux@flux.org
>> http://www.flux.org/mailman/listinfo/linux
>>
>>
>>
> _______________________________________________ Linux mailing list Linux@flux.org
> http://www.flux.org/mailman/listinfo/linux
--Apple-Mail-2-648482374
Content-Type: text/html;
charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
<html><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; =
-webkit-line-break: after-white-space; ">Lou is right in that when using =
sudo you have to use YOUR normal user password. However, there is =
a little trick where you can become the root user without setting a root =
password. It's 'sudo su'. It will ask for your normal user =
password and then put you in a new shell process owned by root (ie: you =
are now root). The only time I really find this convenient is when =
you are typing chains of commands that require root privileges or =
permissions to privileged files either through piping, redirection or =
'tee'. But those instances are few and far between. <div><br =
class=3D"webkit-block-placeholder"></div><div>If for some reason, =
you can't sudo properly:</div><div>- Boot into your Ubuntu live =
CD/DVD</div><div>- Mount your filesystem that is on your hard drive =
(mkdir /mnt/HardDrive; mount -t ext3 /dev/sda1 /mnt/HardDrive #sda1 may =
be different on your system.)</div><div>- Type this in a shell: gedit =
/mnt/HardDrive/etc/sudoers</div><div>- Ensure this line is in there: =
%admin ALL=3D(ALL) ALL</div><div>- Then save and close the =
file.</div><div>- Then open up the groups file: gedit =
/mnt/HardDrive/etc/group</div><div>- Ensure you are part of the admin =
group by looking for the following line: admin:x:114:larry # Your =
group number (114) and username will be different</div><div>- Save the =
file</div><div>- Exit the Live CD and boot back into hard drive =
installation as normal.</div><div><div> </div><div>Hope this =
helps.</div><div><br =
class=3D"webkit-block-placeholder"></div><div><br><div> <div><table =
border=3D"0" cellpadding=3D"5" cellspacing=3D"0" style=3D"border: 1px =
#000066 solid"> <tbody><tr> <td><font face=3D"helvetica,arial"> =
Larry Kagan<br> Superiocity, Inc.<br> =
<a href=3D"http://superiocity.com/">www.superiocity.com</a><br> =
<a href=3D"http://pcn.superiocity.com/">Join the PHP Contractor =
Network</a> </font> </td> </tr> =
</tbody></table> </div> </div><br><div><div>On Jan 12, 2008, at 5:34 AM, =
lou wrote:</div><br class=3D"Apple-interchange-newline"><blockquote =
type=3D"cite"> <div bgcolor=3D"#ffffff" text=3D"#000000"> <font =
size=3D"-1"><font face=3D"Helvetica, Arial, sans-serif">You don't say =
what you tried or if it ever worked but Ubuntu is a "little different" =
in this area. When you do a sudo, it wants YOUR password, not the root =
password (there isn't one by default). If you wan to use su to switch to =
root, you have to set a password. You can do this by:<br> sudo passwd =
root<br> It will ask for your password and then ask you to enter a root =
password twice. After that, you can use su, just like the big kids :) =
<br> Many of the Ubuntu gurus see doing that as a security exposure. =
Dummies like me see it as overcoming an inconvenience.<br> <br> Lou<br> =
</font></font><br> Will Nett wrote: <blockquote =
cite=3D"mid:64fe59440801120223t63519cccsdbd14cc78cef3565@mail.gmail.com" =
type=3D"cite"> <pre wrap=3D"">Ok folks, I'm not losing my mind here, =
but I cannot su or sudo in
Ubuntu 7.10... password is rejected. Any help here? Install is a Dell
Inspiron 9300, and everything looks like it's installed correctly, but
su or sudo is seriously pissing me off.
- Will
_______________________________________________
Linux mailing list
<a class=3D"moz-txt-link-abbreviated" =
href=3D"mailto:Linux@flux.org">Linux@flux.org</a>
<a class=3D"moz-txt-link-freetext" =
href=3D"http://www.flux.org/mailman/listinfo/linux">http://www.flux.org/ma=
ilman/listinfo/linux</a>
</pre> </blockquote> </div> =
_______________________________________________ Linux mailing list =
Linux@flux.org <a =
href=3D"http://www.flux.org/mailman/listinfo/linux">http://www.flux.org/ma=
ilman/listinfo/linux</a> =
</blockquote></div><br></div></div></body></html>=
--Apple-Mail-2-648482374--