Reply
Thread Tools
Posts: 46 | Thanked: 7 times | Joined on Jan 2011 @ AU/MY
#11
Originally Posted by Mentalist Traceur View Post
I'm guessing he has that other root package already installed. I never get sudo gainroot asking for a password.

Either way, only difference is root puts you in the /root directory. You can probably just use "root", then run "passwd root" (without the sudo, since you'd be root already) that way.

But I wouldn't be doing that for another person's N900, unless they've made it very clear that they're okay with you doing it.

- Edit -

"sudo gainroot" works just fine without RD mode. Just installing rootsh enables it.
again, i doubt my girlfriend has any programs that requires root packages installed. She has only found out about Angry birds when I told her the day she got the phone (3days ago)...

I am also confused to why it is prompting a password..it didnt happen on my n900 when I did mine..
 
Posts: 46 | Thanked: 7 times | Joined on Jan 2011 @ AU/MY
#12
[QUOTE=Either way, only difference is root puts you in the /root directory. You can probably just use "root", then run "passwd root" (without the sudo, since you'd be root already) that way.
[/QUOTE]

so what you are saying is that if i typed in root and then passwd root, it should give me the same effect as typing in sudo gainroot?

im sorry if this is a stupid question, but if root just puts me to the root folder, then what does sudo gainroot actually do?
 
anapospastos's Avatar
Posts: 553 | Thanked: 183 times | Joined on Oct 2009 @ Not decided
#13
First type root. After you 're root type passwd root and change the root password.
__________________
My name was Maemo, then it became Meego and now I'm getting a third one. I am Sailfish.
 

The Following User Says Thank You to anapospastos For This Useful Post:
Posts: 46 | Thanked: 7 times | Joined on Jan 2011 @ AU/MY
#14
Thank you for the suggestion. I will update you guys how it goes. the N900 in question has gone to sleep (its wayyyyy past midnight here now).
 

The Following User Says Thank You to mdziaf For This Useful Post:
Posts: 5,795 | Thanked: 3,151 times | Joined on Feb 2007 @ Agoura Hills Calif
#15
The command "root" just runs "sudo gainroot", last I heard.

If you type

cat /usr/bin/root in the terminal, you can see exactly what typing "root" does. Try it.

Error messages like "unable to lock the admin directory" often just mean that you have app mgr open in some other window and you've forgotten about it.
__________________
All I want is 40 acres, a mule, and Xterm.
 
Posts: 1,341 | Thanked: 708 times | Joined on Feb 2010
#16
Originally Posted by Mentalist Traceur View Post
Either way, only difference is root puts you in the /root directory. You can probably just use "root", then run "passwd root" (without the sudo, since you'd be root already) that way.
There are other differences also.
For example with "root" /root/.profile is run and you can for example have different $PATH than "normal" user.
 

The Following 2 Users Say Thank You to zimon For This Useful Post:
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#17
Originally Posted by mdziaf View Post
so what you are saying is that if i typed in root and then passwd root, it should give me the same effect as typing in sudo gainroot?

im sorry if this is a stupid question, but if root just puts me to the root folder, then what does sudo gainroot actually do?
I should've clarified.

Both "sudo gainroot" and "root" elevate that X-Terminal window to the root user. But, if you run "sudo gainroot", you become the root user, but you stay in the same directory you had terminal pointed to before.

So, say you type "cd /usr/bin". If you type "sudo gainroot", you will become the root user, and that X-Term window will still be in /usr/bin. However, if you instead type "root", it will make you root user, then it will do what zimon says (which I didn't know about), but it will change the directory you're in to "/root". So if you're in /usr/bin and type "sudo gainroot", the visible end result is you get root access, and the directory you're in is still /usr/bin. If you're in /usr/bin, and type "root", the visible end result (unless you have custom stuff in /root/.profile) is you end up in the folder /root, and get root access.

For this reason, I use "sudo gainroot", because I've never needed/wanted to fiddle with the $PATH settings to point me somewhere else, and if I'm gaining root access, I usually have already navigated to the directory I want to be in - which means having to renavigate there from /root is at least one more extra command. Whenever I need something in my path, I just move or symlink it into one of the four directories that are in the standard paths. (/bin, /sbin, /usr/bin, /usr/sbin), so it works out for me.

But it's a matter of personal preference. If there's something you can do more effectively by changing /root/.profile, then "root" is good for you.

Anyway, if you say she hasn't installed anything else herself that would give root access, I really don't know why sudo gainroot keeps asking for a password. It SHOULD be something you can edit in /etc/sudoers though...

Question, did you install rootsh from Extras? Or the one in Extras-Devel? (Both are almost the same, but have some key differences... which might be why you're having sudo gainroot ask for a password.) If you're not sure, see if you can run "rootsh passwd root", or "rootsh [other command requiring root permissions]". I believe that functionality was in the Extras version of rootsh, but was removed from the version that's in devel now.

anapospastos already answered the other part of your question. "root" will make you root user (while changing your directory to /root, which doesn't actually do anything other than possibly make you have to type a couple more cd commands or use different relative paths when running commands) [and runs the root/.profile, but that's irrelevant to this], and then passwd root will let you change the root password, without asking you for that password like "sudo" will.
 

The Following 3 Users Say Thank You to Mentalist Traceur For This Useful Post:
FRuMMaGe's Avatar
Posts: 330 | Thanked: 483 times | Joined on Dec 2010 @ Norwich, UK
#18
Originally Posted by mdziaf View Post
However, if I close and reopen Xterminal, and type in
Code:
root
no password prompt was given. but doing an apt-get install would give "unable to lock the admin directory"
The lock error is because you still had app manager opened
__________________
OMNOM: Pacman-like game now in extras-devel

fAircrack (Aircrack GUI): Point-and-click pwnage for your N900
Now with John the Ripper integration
 
Posts: 46 | Thanked: 7 times | Joined on Jan 2011 @ AU/MY
#19
Originally Posted by Mentalist Traceur View Post
I should've clarified.

Both "sudo gainroot" and "root" elevate that X-Terminal window to the root user. But, if you run "sudo gainroot", you become the root user, but you stay in the same directory you had terminal pointed to before.

So, say you type "cd /usr/bin". If you type "sudo gainroot", you will become the root user, and that X-Term window will still be in /usr/bin. However, if you instead type "root", it will make you root user, then it will do what zimon says (which I didn't know about), but it will change the directory you're in to "/root". So if you're in /usr/bin and type "sudo gainroot", the visible end result is you get root access, and the directory you're in is still /usr/bin. If you're in /usr/bin, and type "root", the visible end result (unless you have custom stuff in /root/.profile) is you end up in the folder /root, and get root access.

For this reason, I use "sudo gainroot", because I've never needed/wanted to fiddle with the $PATH settings to point me somewhere else, and if I'm gaining root access, I usually have already navigated to the directory I want to be in - which means having to renavigate there from /root is at least one more extra command. Whenever I need something in my path, I just move or symlink it into one of the four directories that are in the standard paths. (/bin, /sbin, /usr/bin, /usr/sbin), so it works out for me.

But it's a matter of personal preference. If there's something you can do more effectively by changing /root/.profile, then "root" is good for you.

Anyway, if you say she hasn't installed anything else herself that would give root access, I really don't know why sudo gainroot keeps asking for a password. It SHOULD be something you can edit in /etc/sudoers though...

Question, did you install rootsh from Extras? Or the one in Extras-Devel? (Both are almost the same, but have some key differences... which might be why you're having sudo gainroot ask for a password.) If you're not sure, see if you can run "rootsh passwd root", or "rootsh [other command requiring root permissions]". I believe that functionality was in the Extras version of rootsh, but was removed from the version that's in devel now.

anapospastos already answered the other part of your question. "root" will make you root user (while changing your directory to /root, which doesn't actually do anything other than possibly make you have to type a couple more cd commands or use different relative paths when running commands) [and runs the root/.profile, but that's irrelevant to this], and then passwd root will let you change the root password, without asking you for that password like "sudo" will.
Thank you for the clarification regarding root and sudo gainroot. From what i understand, I shouldn't have a problem trying to do a apt-get install command when if I type in either right?

But why is it that I am unable to download and install preenv, after typing root. It gives "unable to lock the admin directory".

@FruMMAGe, We have restarted the phone, and opened up only xterminal without opening the app manager and is till gave the same "unable to lock the admin directory"

Again many thanx for the explanation and help
 
Posts: 255 | Thanked: 107 times | Joined on Nov 2010
#20
it's probably apt-worker trying to update
run killall apt-worker, (after running root) and apt-get should work
 

The Following User Says Thank You to Char For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 22:07.