su: password? sudo su: password returns sh-3.2#???? - HTC One S

im trying to just run a simple su request on my macbook. i tried "su" and it asks for a password. my usual password doesnt work. i ran a sudo su and entered my password at the request. i got back "sh-3.2#"
im am lost to say the least. sh-3.2# isnt a root shell apparently.

+1 Having this problem also, but on Ubuntu 12.04

On ubuntu, you used to have to set up a root password manually before su worked. I dont know if thats still the case.
instead of running 'su' you should be able to run 'sudo <command>'. That executes the command as root.

Related

Android Telnet Client (so you can telnet into your phone after you start telnetd)

Whipped this up last night, because I wanted to be able get root commands on my phone, from my phone. This is a safe/benign way to get root access (ie, you don't have to have a suroot or su laying around, potentially opening a security hole).
I'll throw this up on the Market tonight too.
This is a raw telnet client, so don't expect any fancy!
Terminal Emulator and Busybox
Nice. That makes it even easier No adb or wifi required.
You can also download the Terminal Emulator program from the market, and then install the busybox binary, which has a telnet command.
If you don't have root on your phone yet, use adb to push busybox to /data/local, which is owned by the shell user, so you can chmod it from an adb shell and make it executable.
It still requires adb, but no wifi.

Solved - Change root password

I used the directions from Jesus Freke to install the Mod RC30 on my G1.
Then I read and used the instructions provided by Stericson to change my password....
Only one problem! Now it won't let me access root with su or with my password. I wanted to use something generic first and if it was successful I would change it to a good password. So, I used my user name "shaneaus"
Now I get permission denied with both su and shaneaus!
Am I totally screwed? Is there some way to reset the password back to su. That wouldn't make sense, I know, from a security sense. Just hoping.
Thanks
I'm hoping that there is an easier solution.
But, if I flash the update... Will that reset the root password?
I don't know what happened but this can be remedied. First off, it is possible that when you change the superuser command you failed to chmod it to 4755...at any rate, you can solve this by plugging your phone into your computer and starting up an adb shell, this should give you root if you have the modded rc30. Next remount /system to read and write privileges
mount -o remount,rw /dev/block/mtdblock3 /system
now type:
cd /system/bin
ls
Do you see su or your username listed?
If so type:
chmod 4755 (type su or your username here, without parantheses)
now open terminal emulator on your phone and try your superuser command again.
If you did not see su or your username in the output of ls type the following to get a setuid shell:
cat sh > (username or su whichever you want)
chmod 4755 (username or su whichever you want)
now open terminal emulator on your phone and try your superuser command again.
That should get you going.
Ha!
I'm just beginning to learn how to do this stuff. I have no idea how to "start up an adb shell" or even what an adb shell is!
So, I guess I'll start researching on line!
Ok, so I've read up on the adb shell and think I have a grip on how to use it... Except I can't figure out how to get the darn thing started. Do I have to open up the emulator? I thought I would be accessing the device - not the emulator. But, most sites talk about using the adb with the emulator. Also, I have seen where I should be able to run adb devices.exe and have it show my device to confirm it is connected. Only one problem, I can't find the adb devices.exe in the sdk kit.
Oh, and thanks again to Jesus Freke for the 64bit USB drivers. worked like a charm!
Awesome! Y'all are fantastic! I learned a lot tonight! I did the following:
Add $SDK_ROOT\tools to my path
Then had a hell of a time because everything I was reading (except for one location I finally found said to run "adb shell.exe"
I finally found a site that said to run "adb.exe shell"
And, whalla! I was in.
Your above advise was spot on, Stericson! Thank you!
Glad to hear you got it sorted.
shaneaus said:
Oh, and thanks again to Jesus Freke for the 64bit USB drivers. worked like a charm!
Click to expand...
Click to collapse
*looks around* huh? me?
I assume you're refering to this driver?
You should be thanking aziwoqpd for that, not me

Some problems with rooting EVO with unrEVOked

Hello,
First off, let me say, this is my first android device. I have some experience with linux and previously owned a rooted Palm Pre.
I have an HTC EVO, and have rooted it (at least I think it's rooted), with a program called unrEVOked. It flashed a NAND called ClockworkMod Recovery (2.5.0.1), and I can get to the shell using the adb shell command when it is in recovery mode.
However, even with the SuperUser app installed, I'm having trouble running sudo or any command at the terminal (on the phone), and the apps appear to also be having trouble executing any commands that are within /sbin/ (such as killall for the Shark capture packet sniffer). This is persistent while in USB Debugging Mode and running adb shell.
I didn't have to interact with the system at all during unrEVOked, including creating a user, which struck me as odd. Also, never set up an SSH server daemon, but that's okay. I'd be a happy guy if 1) I could actually use commands in /sbin/ and programs could also do this. Note that at a terminal, when I run aname, it tells me that I don't have permission. sudo su does the same.
Alright... I can get su root via the adb shell and terminal emulator.
androidpolice com/2010/05/24/that-was-quick-evo-4gs-already-been-rooted/
It still doesn't appear that apps like a file manager, and Shark packet sniffer can get root though; even with granting them SuperUser access. Any ideas?
Any help is appreciated.
Thanks,
Matt

[Q] Help in "How to downgrade 1.72/1.75 to 1.32"!

I did every thing as it is mentioned in the Post, but after i enter
"./misc_version -s 1.31.405.6"
it says:
"permission Denied"
any thing else i can do?
There are two reasons which came into my mind:
1) psneuter did not manage to gain root access.
Otherwise you had permissions to access /dev/block/mmcblk0p17
Did you have "#" prompt when you entered "./misc_version -s 1.31.405.6" command or was the prompt "$" ?
2) there's something wrong with /data/local/tmp/psneuter file. Maybe missing execute permission so it gives "permission Denied" when you are trying to execute it?
Copy-paste of terminal session would help a lot.
Problem solved!
I tried the procedure 3 or 4 times and in all of them I got "#" sign I do not know what was the problem but this last time it worked!
Thank You Very Much
I have the same problem!
Thank You Very Much

[Q] Rooted android

i want to know what is sudo location?
Because i have a rooted android and when i checked it by using root checker it shows its rooted but no sudo location...
amey.patil said:
i want to know what is sudo location?
Because i have a rooted android and when i checked it by using root checker it shows its rooted but no sudo location...
Click to expand...
Click to collapse
If I open terminal emulator and want to get root access, I'm just type "su" and get the root access..
lietsen said:
If I open terminal emulator and want to get root access, I'm just type "su" and get the root access..
Click to expand...
Click to collapse
what is the difference between sudo and su?
amey.patil said:
what is the difference between sudo and su?
Click to expand...
Click to collapse
I'm not a linux/android expert, but as long as I know, 'su' forces you to share your root password to other users whereas 'sudo' makes it possible to execute system commands without root password. When we're login into linux system and not a root, with sudo we can execute some program without using root password, as long as the user is in sudoers file conf.
Ex: I want execute "mysqld start" in linux, and I'm not root, but my username was registered in sudoers file, we can simply type "sudo mysqld start", and then system will ask the current user password. Another example is, we type "su". If the root has a password, then we must type the root password before we can executed another command, after that we'll become root.
I don't know in android if root has password or not, but till now where I want to executed some root program in terminal, I only type 'su' and no password.
*sorry for my bad english and explanation, i'm just nood*
SUDO vs. SU
The SUDO command stands for "superuser do". It prompts you for your personal password and confirms your request to execute a command by checking a file, called sudoers, which the system administrator configures. Using the sudoers file, system administrators can give certain users or groups access to some or all commands without those users having to know the root password. It also logs all commands and arguments so there is a record of who used it for what, and when. The SU command on the other hand stands for "switch user", and allows you to become another user. Using su creates security hazards, is potentially dangerous, and requires more administrative maintenance. It's not good practice to have numerous people knowing and using the root password because when logged in as root, you can do anything to the system. This could provide too much power for inexperienced users, who could unintentionally damage the system.
Source

Categories

Resources