Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Root vs sudo gainroot

    Reply
    Page 3 of 3 | Prev |   1     2   3 |
    Rob1n | # 21 | 2011-01-11, 08:38 | Report

    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?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    mdziaf | # 22 | 2011-01-11, 09:26 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Rob1n | # 23 | 2011-01-11, 10:26 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 2 Users Say Thank You to Rob1n For This Useful Post:
    cheve, mdziaf

     
    mdziaf | # 24 | 2011-01-11, 10:35 | Report

    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

    Edit | Forward | Quote | Quick Reply | Thanks

     
    mdziaf | # 25 | 2011-01-11, 13:33 | Report

    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:~#

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Rob1n | # 26 | 2011-01-11, 14:22 | Report

    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)?

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to Rob1n For This Useful Post:
    mdziaf

     
    mdziaf | # 27 | 2011-01-11, 14:30 | Report

    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

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Char | # 28 | 2011-01-11, 18:14 | Report

    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

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Page 3 of 3 | Prev |   1     2   3 |
vBulletin® Version 3.8.8
Normal Logout