Can't man or sudo in terminal

heyandy889

New Member
Joined
Dec 22, 2010
Messages
11
Reaction score
0
Hello, fellow Droid X enthusiasts. These forums have been a wonderful source for advice about my smart phone. Despite my best efforts, I am unable to resolve my current query.

As stated in the thread topic, I can't use man or sudo in the terminal. I tried Android Terminal Emulator as well as Better Terminal Pro. Both gave me the same error messages.

$ man nobody
man: permission denied
$ sudo !! /*sudo bang bang, run previous command with superuser privileges*/
sudo: permission denied

What gives? My phone is rooted. I shouldn't be denied permission to anything. ;-)

Rooted Droid X running Froyo, the Motorola update 2.3.340
 
hey, sorry no one answered this yet, but the superuser command in android isn't "sudo" it's "su" - just a little android quirk. Also, it's not like linux with "sudo [command]"

Terminal looks like this:
$
$ su
# <- superuser prompt

now anything you type is run at root status

also as far to my knowledge android doesn't have man pages :( - remember, it's not full-blown linux, it's android

another tip - I use "ConnectBot" as opposed to any terminal emulators. it's actually an ssh client, but you can set up a local connection which is a terminal - no unitaskers for me :p
also, with ConnectBot, you can do some post login automated scripting, so I have a "Root Terminal" connection that when you open it it auto runs "su" so it goes right to a superuser prompt, but you can do some basic bash-like scripting from in there - before the nice guis I had overclock pushing and changing scripts set up all through connectbot. It's a great tool
 
Ah, delightful! Thank you very much. :-D su definitely did the trick. So, su gives you a fresh prompt #. Then, after running a command, I got a second superuser command prompt #. Looks like you have to type "exit" to return to regular user status. A second "exit" will end your terminal session.

Cool! So, I used ConnectBot. I do like the ssh capabilities. :-D However, the text seems so small! Is there a way to enlarge the text for ConnectBot?

Again, thanks. Didn't realize that "man" was unique to GNU/Linux.
 
yes, you have to type 'exit' to exit the superuser prompt, suppose I should have stated that but you seem pretty savvy.

as for enlarging the text....I don't know, my eyes are pretty good so it doesn't bother me so much...you can use the zoom mode accessability, but it's subpar at best. if you really have trouble reading the text it may not be for you.

to use zoom mode:

settings -> accessibility -> (checkmark) -> checkmark zoom mode

kinda sucks, but it's a little better
 
Again, thanks. Didn't realize that "man" was unique to GNU/Linux.

It's a UNIX/Unix-like OS thing. Just to be clear, though - Android IS a Linux distro with a custom UI. However, things that are not used by a stock Android setup (such as man pages) are left out to keep the size down. Think of it as a "mini Linux distro".
 
Actually....

su AND sudo are both commands used in GNU/Linux. Sudo = super user do and su = substitute user. Technically, when you sudo <command> you are executing the command as root, even though your are not. When you 'su' you actually slip into whichever account you want to be as long as you know the password (I.E. su root makes you root, then you have to 'exit' and it dumps you back into the previous profile and directory you were in.) Now I stumbled across this board because I would like to know if any GNU/Linux users out there have experimented with this idea. You are out of luck if you try to substitute user on an unrooted phone. However, for the individual who does not want to root, but execute commands available to a root user (any and all) such as killing the background Skype process that keeps running even after you close it (you can 'top' in an Android terminal, but you can't 'kill' the process due to permissions), you would want to 'sudo <kill PID>'. If the phone supports 'sudo', then there should be a file/support for a file called the "sudoers list". Append this list and add anyone you want to have the ability to 'sudo'. Nice in theory, but I haven't tried because I don't want to brick my phone without doing my research, which is again why I'm here. So, has anyone tried something to the effect of hooking the phone up to a GNU/Linux OS, assumed root, found/edited sudoers file on the Android phone, and tried to 'sudo'?
 
Don't mean to sound like a know it all just passionate about this topic. I was thinking about this at work last night and couldn't find much after searching hehe.

Sent from my ADR6300 using DroidForums App
 
Back
Top