Mailing List Archive

Can I do root; then passwd to change root password?
Hi anyone know whether doing:

1 root (to gain root access)
2 passwd (to change the password)

would couse a meltdown of my phone?

f(t)
Re: Can I do root; then passwd to change root password? [ In reply to ]
Am Mittwoch, den 20.10.2010, 18:58 -0300 schrieb Francisco Diaz Trepat:
> Hi anyone know whether doing:
> 1 root (to gain root access)
> 2 passwd (to change the password)
> would couse a meltdown of my phone?

If you type "Google" into Google, you can break the internet!

andre
--
Andre Klapper (maemo.org bugmaster)

_______________________________________________
maemo-users mailing list
maemo-users@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-users
Re: Can I do root; then passwd to change root password? [ In reply to ]
hahaha. +1

On 10/20/10, Andre Klapper <aklapper@openismus.com> wrote:
> Am Mittwoch, den 20.10.2010, 18:58 -0300 schrieb Francisco Diaz Trepat:
>> Hi anyone know whether doing:
>> 1 root (to gain root access)
>> 2 passwd (to change the password)
>> would couse a meltdown of my phone?
>
> If you type "Google" into Google, you can break the internet!
>
> andre
> --
> Andre Klapper (maemo.org bugmaster)
>
> _______________________________________________
> maemo-users mailing list
> maemo-users@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-users
>


--
DY
_______________________________________________
maemo-users mailing list
maemo-users@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-users
Re: Can I do root; then passwd to change root password? [ In reply to ]
sorry if my question was beneath your standards. i was uncertain of it
because I read that some system processes used sudo and I thought (in my
ignorance) that I could break something if I changed the password of root.

f(t)

On Wed, Oct 20, 2010 at 7:14 PM, Andre Klapper <aklapper@openismus.com>wrote:

> Am Mittwoch, den 20.10.2010, 18:58 -0300 schrieb Francisco Diaz Trepat:
> > Hi anyone know whether doing:
> > 1 root (to gain root access)
> > 2 passwd (to change the password)
> > would couse a meltdown of my phone?
>
> If you type "Google" into Google, you can break the internet!
>
> andre
> --
> Andre Klapper (maemo.org bugmaster)
>
> _______________________________________________
> maemo-users mailing list
> maemo-users@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-users
>
Re: Can I do root; then passwd to change root password? [ In reply to ]
Hi f(t),

You can do that.

Just
~ $ sudo gainroot
# passwd
# exit
~ $ su
Password:

Hope this helps :)

On Thu, Oct 21, 2010 at 5:07 AM, Francisco Diaz Trepat - gmail <
francisco.diaztrepat@gmail.com> wrote:

> sorry if my question was beneath your standards. i was uncertain of it
> because I read that some system processes used sudo and I thought (in my
> ignorance) that I could break something if I changed the password of root.
>
> f(t)
>
>
> On Wed, Oct 20, 2010 at 7:14 PM, Andre Klapper <aklapper@openismus.com>wrote:
>
>> Am Mittwoch, den 20.10.2010, 18:58 -0300 schrieb Francisco Diaz Trepat:
>> > Hi anyone know whether doing:
>> > 1 root (to gain root access)
>> > 2 passwd (to change the password)
>> > would couse a meltdown of my phone?
>>
>> If you type "Google" into Google, you can break the internet!
>>
>> andre
>> --
>> Andre Klapper (maemo.org bugmaster)
>>
>> _______________________________________________
>> maemo-users mailing list
>> maemo-users@maemo.org
>> https://lists.maemo.org/mailman/listinfo/maemo-users
>>
>
>
> _______________________________________________
> maemo-users mailing list
> maemo-users@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-users
>
>


--
Thanks & Regards,
Avinash Joshi

Web: http://avinashjoshi.co.in
Re: Can I do root; then passwd to change root password? [ In reply to ]
Hi,

sorry, my first mail was intended to be sent to the list, too.

Am Thu, Oct 21, 2010 at 11:46:57AM +0530 schrieb Avinash Joshi:
> > Am Thu, Oct 21, 2010 at 08:35:47AM +0530 schrieb Avinash Joshi:
> > > Just
> > > ~ $ sudo gainroot
> >
> > in this context I've got another question:
> > I've never understood why I should use gainroot instead of simply typing
> > `sudo
> > su`. Is there any difference?
> >
>
> Here is the thing (BTW, this is what i understand); Maemo N900 is not
> supposed to allow a user to gain root access. So, the rootsh package gives
> us a back-door entry :)
>
> And, you can aswell do a `sudo su`; but we do not have the root password in
> the beginning. So, do a `sudo gainroot` and then change the root password
> and then `sudo su`

Okay, then maybe my problem of understanding has its origin in the fact that I
bought my N900 second hand. Although I'm supposed that the former owner did not
have done much with it. The thing is that on my N900 I was always allowed to
gain root access by `sudo su` without any password (although there is no entry
allowing su explicitly in the sudoers file...).

Regards
Oleg

--
"Dass der Mensch das edelste Geschöpf sei, lässt sich schon daraus abnehmen,
dass es ihm noch kein anderes Geschöpf widersprochen hat."
Georg Christoph Lichtenberg
Re: Can I do root; then passwd to change root password? [ In reply to ]
Hi,

Oleg Hahm wrote:
>>> Am Thu, Oct 21, 2010 at 08:35:47AM +0530 schrieb Avinash Joshi:
>>>> ~ $ sudo gainroot
>>> in this context I've got another question:
>>> I've never understood why I should use gainroot instead of simply typing
>>> `sudo
>>> su`. Is there any difference?

There are a few ways to open a root shell in Linux using su / sudo.

sudo -s (this is my preferred method, it just says "open a shell")
sudo su (run su as root - I don't like this, since it's doing the same
thing twice, but some people use this)
sudo /bin/sh

They all rely on sudo to change the UID, and they all depend on having
sufficient privileges in the sudoers file for the unprivileged user.

You can get more details about the specifics of becoming root on Maemo
here: http://wiki.maemo.org/Root_access

And some of the history in this older talk thread:
http://talk.maemo.org/showthread.php?t=33911

The short version is that gainroot was left as a back-door for
developers when the device was put in R&D mode. Installing ssh-server
allows you to set a root password at install time, and you can avoid
sudo altogether. Installing rootsh provides you with a gainroot that
works even when your device isn't in R&D mode - this is likely what your
device's previous owner did.

Cheers,
Dave.

--
maemo.org docsmaster
Email: dneary@maemo.org
Jabber: bolsh@jabber.org

_______________________________________________
maemo-users mailing list
maemo-users@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-users
Re: Can I do root; then passwd to change root password? [ In reply to ]
It's worth noting that unless you have good reason not to, the 'su' command ought to be followed by a single dash or -l to properly apply all environment variables & permissions attributed to root or what user is your target. q.v. http://manpages.ubuntu.com/manpages/maverick/en/man1/su.1.html

-Gary
_______________________________________________
maemo-users mailing list
maemo-users@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-users
Re: Can I do root; then passwd to change root password? [ In reply to ]
Hi!

Am Thu, Oct 21, 2010 at 04:17:31AM -0700 schrieb Gary:
> It's worth noting that unless you have good reason not to, the 'su' command ought to be followed by a single dash or -l to properly apply all environment variables & permissions attributed to root or what user is your target. q.v. http://manpages.ubuntu.com/manpages/maverick/en/man1/su.1.html

Sorry, I don't get your point. I'm pretty familiar with sudo and su but see no
reason to call a root-login shell everytime I need superuser permissions.

Regards
Oleg

--
"But I swear to God that I will tell the truth
If I only knew what it was"
Backyard Babies, Kickin' Up Dust
Re: Can I do root; then passwd to change root password? [ In reply to ]
On Oct 21, 2010, at 4:25 AM, Oleg Hahm wrote:
> Sorry, I don't get your point. I'm pretty familiar with sudo and su but see no
> reason to call a root-login shell everytime I need superuser permissions.

I was not suggesting that you should nor was I speaking of the sudo command. If you find yourself using su to change users (root, mail, news, ohahm, gary, etc.) then it's advisable to append a dash. Naturally, the users above are not present in maemo but if you pick up a bad habit from one command line it's likely to follow you elsewhere.

-Gary
_______________________________________________
maemo-users mailing list
maemo-users@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-users