Reply
Thread Tools
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#21
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"
Is it actually changing user? Do you get the # prompt instead of the $ prompt?
 
Posts: 46 | Thanked: 7 times | Joined on Jan 2011 @ AU/MY
#22
Originally Posted by Rob1n View Post
Is it actually changing user? Do you get the # prompt instead of the $ prompt?
I did get the # prompt instead of the $ sign last time I tried it.
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#23
Originally Posted by mdziaf View Post
I did get the # prompt instead of the $ sign last time I tried it.
Okay, so that's working at least.

The "sudo gainroot" shouldn't be asking for a password though, so the next thing to do is check whether the sudoers entry is correct - what's the result of running (as root) the following?:
Code:
grep gainroot /etc/sudoers.d/01sudo
As for the lock error, you can try checking for applications holding the lock file. You'll need to be root, and have lsof installed (not sure whether it's standard or not - it's in the Nokia SSU repository though), then run:
Code:
lsof /var/lib/dpkg/lock
If that doesn't list anything, I'd also suggest checking rootfs space (df -h /) - it may well be unable to lock the file if there's no rootfs space free.
 

The Following 2 Users Say Thank You to Rob1n For This Useful Post:
Posts: 46 | Thanked: 7 times | Joined on Jan 2011 @ AU/MY
#24
Originally Posted by Rob1n View Post
Okay, so that's working at least.

The "sudo gainroot" shouldn't be asking for a password though, so the next thing to do is check whether the sudoers entry is correct - what's the result of running (as root) the following?:
Code:
grep gainroot /etc/sudoers.d/01sudo
As for the lock error, you can try checking for applications holding the lock file. You'll need to be root, and have lsof installed (not sure whether it's standard or not - it's in the Nokia SSU repository though), then run:
Code:
lsof /var/lib/dpkg/lock
If that doesn't list anything, I'd also suggest checking rootfs space (df -h /) - it may well be unable to lock the file if there's no rootfs space free.
Ok I will get my girlfriend to do that when she comes back..will update you..appreciate the help
 
Posts: 46 | Thanked: 7 times | Joined on Jan 2011 @ AU/MY
#25
Originally Posted by Rob1n View Post
Okay, so that's working at least.

The "sudo gainroot" shouldn't be asking for a password though, so the next thing to do is check whether the sudoers entry is correct - what's the result of running (as root) the following?:
Code:
grep gainroot /etc/sudoers.d/01sudo
Running the code gives me the following:
Code:
BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso30+0m5) built-in shell (ash) 
Enter 'help' for a list of built-in commands. 

Nokia-N900-51-1:~# grep gainroot /etc/sudoers.d/01sudo 
user ALL = NOPASSWD: /usr/sbin/gainroot 
Nokia-N900-51-1:~#
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#26
Originally Posted by mdziaf View Post
Running the code gives me the following:
Code:
BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso30+0m5) built-in shell (ash) 
Enter 'help' for a list of built-in commands. 

Nokia-N900-51-1:~# grep gainroot /etc/sudoers.d/01sudo 
user ALL = NOPASSWD: /usr/sbin/gainroot 
Nokia-N900-51-1:~#
That's okay anyway - it specifies NOPASSWD so it shouldn't be asking for any password. What about:
Code:
grep gainroot /etc/sudoers
If that only gives the exact same result, can you post the contents of /usr/sbin/gainroot (cat /usr/sbin/gainroot)?
 

The Following User Says Thank You to Rob1n For This Useful Post:
Posts: 46 | Thanked: 7 times | Joined on Jan 2011 @ AU/MY
#27
Originally Posted by Rob1n View Post
That's okay anyway - it specifies NOPASSWD so it shouldn't be asking for any password. What about:
Code:
grep gainroot /etc/sudoers
If that only gives the exact same result, can you post the contents of /usr/sbin/gainroot (cat /usr/sbin/gainroot)?
Rob1n, I appreciate your help with this matter. but I I wont run the code, as when I tried apt-get install preenv, we were able to download and install the application. Since this was the original aim to root the N900, I feel theres no need to delve deeper into the problem.

Again many thanx to everyone for your help Appreciate it a lot
 
Posts: 255 | Thanked: 107 times | Joined on Nov 2010
#28
Originally Posted by mdziaf View Post
Rob1n, I appreciate your help with this matter. but I I wont run the code, as when I tried apt-get install preenv, we were able to download and install the application. Since this was the original aim to root the N900, I feel theres no need to delve deeper into the problem.

Again many thanx to everyone for your help Appreciate it a lot
so the problem WAS probably apt-worker
 
Reply


 
Forum Jump


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