maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Newbie (https://talk.maemo.org/forumdisplay.php?f=26)
-   -   confused about sudo and red pill mode? (https://talk.maemo.org/showthread.php?t=6318)

bakerbaker 2007-05-14 15:48

confused about sudo and red pill mode?
 
hi, i went into red pill mode, installed ssh, and ssh into my localhost.

afterwards i changed my rootme password to a personal one. i exited out.

now when i fire up a terminal, and do a sudo something, i get asked a password by the password i choose is not getting accepted.

i retested my password by ssh@localhost and put in my new password and it works.

so what account am i using in regular mode(starting n800 and firing up a terminal) and what password is it?


thanks.

aganon 2007-05-14 23:43

Re: confused about sudo and red pill mode?
 
The regular user account, is well, user. With no password, you'll want to change that.

bakerbaker 2007-05-16 14:30

Re: confused about sudo and red pill mode?
 
how do i change password for user?

Quote:

Originally Posted by aganon (Post 48472)
The regular user account, is well, user. With no password, you'll want to change that.


SeRi@lDiE 2007-05-16 20:12

Re: confused about sudo and red pill mode?
 
Quote:

Originally Posted by bakerbaker (Post 48711)
how do i change password for user?

from xterm....

sudo gainroot

passwd user "password here"

skinny 2007-06-04 08:20

Re: confused about sudo and red pill mode?
 
If the default no-password setup for sudo doesn't work (ie, I just press return when prompted for the password, but the command isn't executed), is there any explanation other than I may have changed it, without fully realising what I was doing, when I first got xterm a couple of months ago?

I remember doing something with passwords but I got the impression that whatever I was doing wasn't working, so I assumed I'd changed nothing. I've go a couple more months of Linux under my belt now, so I'm feeling a bit more confident :)

If I have changed the password (and don't know what it is), is the only fix to reflash?

Cheers.

barry99705 2007-06-04 17:20

Re: confused about sudo and red pill mode?
 
Quote:

Originally Posted by skinny (Post 50904)
If the default no-password setup for sudo doesn't work (ie, I just press return when prompted for the password, but the command isn't executed), is there any explanation other than I may have changed it, without fully realising what I was doing, when I first got xterm a couple of months ago?

I remember doing something with passwords but I got the impression that whatever I was doing wasn't working, so I assumed I'd changed nothing. I've go a couple more months of Linux under my belt now, so I'm feeling a bit more confident :)

If I have changed the password (and don't know what it is), is the only fix to reflash?

Cheers.

No, you can still change it as root. Unless it's the root password you've forgotten.

skinny 2007-06-05 10:31

Re: confused about sudo and red pill mode?
 
Quote:

No, you can still change it as root.
By using red-pill mode and gainroot?

But according to previous posts, I have to type...

Code:

sudo gainroot
...to do this, so won't I need the sudo password?

SeRi@lDiE 2007-06-05 11:07

Re: confused about sudo and red pill mode?
 
Quote:

Originally Posted by skinny (Post 51061)
By using red-pill mode and gainroot?

But according to previous posts, I have to type...

Code:

sudo gainroot
...to do this, so won't I need the sudo password?


I am going to explain this as n00b as I can!

For now for get about the damn red pill mode. sudo and red pill mode have nothing to do with each other! capich!

When you changed your rootme password you changed your roots password so you are in root mode when you log in.

so from xterm do
ssh root@xxx.xxx.xxx.xxx
when promted for a password type the password you change from rootme to your personal one...

Once in root in there you will type the following command

passwd user
when promted type your new password for user.

When done you will type

echo "user ALL = PASSWD: /bin/su" >> /etc/sudoers

And now when you use sudo your password will be your user password...

Note:

If you install the "gainroot" deb you dont need a password for sudo just type in xterm

sudo gainroot

And that will take you straight in to root mode with no password..

But just for gainroot everything else you will need your user password.

skinny 2007-06-05 12:25

Re: confused about sudo and red pill mode?
 
Quote:

For now for get about the damn red pill mode. sudo and red pill mode have nothing to do with each other! capich!
Si, capisco!

Quote:

When you changed your rootme password...
I haven't changed my rootme password. It sounds like you think I'm the OP.

Thanks for the instructions tho. What do I replace the xxx's with in the ssh command?

Cheers.

skinny 2007-06-05 13:39

Re: confused about sudo and red pill mode?
 
Sorted it now :)

I replaced the xxx's with "localhost" like the OP and it all worked!

I found that I couldn't execute some commands with sudo and, on further investigation, found out that I needed to edit /etc/sudoers. I ended up putting the line...

user ALL = ALL

...above the other "user...." lines to give myself password protected access to all commands, other than those which are defined otherwise afterwards.

And that seemed to work fine :)

Thankyou to barry99705 and SeRi@lDiE for your assistance!


All times are GMT. The time now is 15:06.

vBulletin® Version 3.8.8