![]() |
2011-01-10
, 16:35
|
Posts: 46 |
Thanked: 7 times |
Joined on Jan 2011
@ AU/MY
|
#12
|
![]() |
2011-01-10
, 16:37
|
|
Posts: 553 |
Thanked: 183 times |
Joined on Oct 2009
@ Not decided
|
#13
|
The Following User Says Thank You to anapospastos For This Useful Post: | ||
![]() |
2011-01-10
, 16:51
|
Posts: 46 |
Thanked: 7 times |
Joined on Jan 2011
@ AU/MY
|
#14
|
The Following User Says Thank You to mdziaf For This Useful Post: | ||
![]() |
2011-01-10
, 17:11
|
Posts: 5,795 |
Thanked: 3,151 times |
Joined on Feb 2007
@ Agoura Hills Calif
|
#15
|
![]() |
2011-01-10
, 17:19
|
Posts: 1,341 |
Thanked: 708 times |
Joined on Feb 2010
|
#16
|
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.
The Following 2 Users Say Thank You to zimon For This Useful Post: | ||
![]() |
2011-01-10
, 17:50
|
Posts: 2,225 |
Thanked: 3,822 times |
Joined on Jun 2010
@ Florida
|
#17
|
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?
The Following 3 Users Say Thank You to Mentalist Traceur For This Useful Post: | ||
![]() |
2011-01-10
, 17:57
|
|
Posts: 330 |
Thanked: 483 times |
Joined on Dec 2010
@ Norwich, UK
|
#18
|
However, if I close and reopen Xterminal, and type in
no password prompt was given. but doing an apt-get install would give "unable to lock the admin directory"Code:root
![]() |
2011-01-11
, 05:56
|
Posts: 46 |
Thanked: 7 times |
Joined on Jan 2011
@ AU/MY
|
#19
|
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.
I am also confused to why it is prompting a password..it didnt happen on my n900 when I did mine..