maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   default password and how to change it (https://talk.maemo.org/showthread.php?t=36321)

asidana 2009-12-08 18:51

default password and how to change it
 
i was trying to reboot n900 from xterminal and typed sudo reboot. it asked me password which i have no idea what it is. What is default pw and how can i change it?
thanks

hypnotik 2009-12-08 18:54

Re: default password and how to change it
 
Quote:

Originally Posted by asidana (Post 417105)
i was trying to reboot n900 from xterminal and typed sudo reboot. it asked me password which i have no idea what it is. What is default pw and how can i change it?
thanks

You want to install the rootsh package from extras first:

then do:

$ sudo gainroot
# reboot

I'm not sure what the password is.

asidana 2009-12-08 18:57

Re: default password and how to change it
 
thanks, i did have it installed but forgot to use gainroot command.
so there is no default password then?

eMHa 2009-12-08 18:58

Re: default password and how to change it
 
There's no password set! Not for root and not for user! The password is disabled and NOT left empty!

IMHO gainroot is not as safe (internet security) as installing ssh server and setting root password while installing ssh server (and copying ssh pub key and disbleing root password).

R-R 2009-12-08 18:59

Re: default password and how to change it
 
Agreed, ssh all the way :-)

casper27 2009-12-08 19:10

Re: default password and how to change it
 
You can change the root password
Code:

sudo passwd root
enter new password..

Easy

hypnotik 2009-12-08 19:17

Re: default password and how to change it
 
sudo make me a sandwich?

romanianusa 2009-12-08 21:10

Re: default password and how to change it
 
download a program called sudu something...and it gives u access without password..it's in download area.

Bodestone 2010-02-03 20:11

Re: default password and how to change it
 
OK, I know this is an old thread and I may be asking a silly question but...

I followed the: sudo passwd root
I set a password. I assumed that this meant that I would need to enter a password each time I used sudo for root access. Is this not the case?

I seem to still be able to run commands with root access just by using sudo.

Sorry, a little new to linux and am still digging around some of the basics.

floffe 2010-02-04 09:53

Re: default password and how to change it
 
sudo uses the user password rather than root, when it uses one at all. I think on the N900 it's setup to never ask for a password at all (look at /etc/sudoers but DO NOT EDIT MANUALLY). See http://talk.maemo.org/showthread.php?p=491437 for some more info.

Cue 2010-02-11 06:48

Re: default password and how to change it
 
Quote:

Originally Posted by floffe (Post 510102)
sudo uses the user password rather than root, when it uses one at all. I think on the N900 it's setup to never ask for a password at all (look at /etc/sudoers but DO NOT EDIT MANUALLY). See http://talk.maemo.org/showthread.php?p=491437 for some more info.

hate to drag this up again but can I ask how do I edit the sudoers list if I'm not allowed to append it manually?

I wish to mount a samba share from a script but the mount command requires privileges.

using rootsh I gain root access and set a password for "user"

Code:

sudo gainroot
passwd user

now "sudo mount" asks for a password that I set. but I obviously get an error:
Code:

sorry, user user is not allowed to execute /bin/mount
because I do not have the appropriate line in my /etc/sudoers file. how do I go about doing this if appending it manually is not recommended?

floffe 2010-02-11 13:58

Re: default password and how to change it
 
"sudo visudo" can be used to edit sudoers (set $EDITOR to something else if you want to use another editor than vi) and will check the syntax after closing the file. See http://www.gratisoft.us/sudo/man/sudoers.html for what can go in there.

stefanmohl 2013-08-23 12:18

Re: default password and how to change it
 
Don't use visudo on Maemo! The /etc/sudoers file is auto-generated and works differently on n900 than a standard Linux system.

Instead, add a file to /etc/sudoers.d, then run 'update-sudoers'.

This is the Maemo way. The reason is that normal users don't usually have root, so an app installed by a normal user can easily add a file to /etc/sudoers.d to give itself the root privileges it needs.

misiak 2013-08-23 12:49

Re: default password and how to change it
 
Quote:

Originally Posted by stefanmohl (Post 1368907)
Don't use visudo on Maemo! The /etc/sudoers file is auto-generated and works differently on n900 than a standard Linux system.

Instead, add a file to /etc/sudoers.d, then run 'update-sudoers'.

This is the Maemo way. The reason is that normal users don't usually have root, so an app installed by a normal user can easily add a file to /etc/sudoers.d to give itself the root privileges it needs.

Good reply, but you just revived a 3yo thread ;)

stefanmohl 2013-08-23 13:10

Re: default password and how to change it
 
DuckDuckGo is my friend, and old forum threads are my results. :) I am not replying to the OP, I am just helping other search-result surfers not mess up their system too much.


All times are GMT. The time now is 20:57.

vBulletin® Version 3.8.8