View Full Version : confused about sudo and red pill mode?
bakerbaker
05-14-2007, 11:48 AM
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
05-14-2007, 07:43 PM
The regular user account, is well, user. With no password, you'll want to change that.
bakerbaker
05-16-2007, 10:30 AM
how do i change password for user?
The regular user account, is well, user. With no password, you'll want to change that.
SeRi@lDiE
05-16-2007, 04:12 PM
how do i change password for user?
from xterm....
sudo gainroot
passwd user "password here"
skinny
06-04-2007, 04:20 AM
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
06-04-2007, 01:20 PM
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
06-05-2007, 06:31 AM
No, you can still change it as root.
By using red-pill mode and gainroot?
But according to previous posts, I have to type...
sudo gainroot
...to do this, so won't I need the sudo password?
SeRi@lDiE
06-05-2007, 07:07 AM
By using red-pill mode and gainroot?
But according to previous posts, I have to type...
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
06-05-2007, 08:25 AM
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!
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
06-05-2007, 09:39 AM
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!
SeRi@lDiE
06-05-2007, 12:05 PM
Sorted it now :)
I replaced the xxx's with "localhost" like the OP and it all worked!
A bit of comonsense ;)
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 :)
Thats exactle what I said in my previous post.
echo "user ALL = PASSWD: /bin/su" >> /etc/sudoers
That would give you full acces to sudo.
Thankyou to barry99705 and SeRi@lDiE for your assistance!
You Welcome.
SeRi@lDiE
06-05-2007, 12:08 PM
Si, capisco!
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.
You posted in your initial post
afterwards i changed my rootme password to a personal one. i exited out
Thats why I posted to use your personal password.
skinny
06-06-2007, 04:32 AM
Thats exactle what I said in my previous post.
echo "user ALL = PASSWD: /bin/su" >> /etc/sudoers
That would give you full acces to sudo.
Yeah I did that but I still couldn't execute some commands. I tried...
sudo vim <whateverfile>
...to see if I could open the file writably but I got an error along the lines of...
user user is not allowed to execute <somethingsomething> as root on <something>
I also tried to execute...
hcitool info <bd address>
...and got the same error.
I assumed it was these commands that needed adding to /etc/sudoers. That's why I put the "user ALL = ALL" line in.
So should the line that you said to put in have given me access to these commands too?
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.