Can't login as root! - HD2 Ubuntu Q&A, Help & Troubleshooting and General

I can't login as root on ubuntu 0.3 on my htc hd2, any help?

sudo passwd
by default ubuntu doesn't have a root password,so set it via sudo.
this will solve your problem. but why?are you going to purge sudo?

option1:
Open terminal
sudo su -
option2:
create a new user and put in admin group

Related

How to Root Nexus 4 in Linux the Linux way.

Note read other installation methods for windows and mac. This might help fill in the blanks.
I know us linux users don't understand all the wordy talk in android so I will be short and specific.
Because adb and fastboot are not native to ubuntu or any linux distro you must place these executable files in /bin or /usr/bin folder.
Open terminal type sudo Nautilus.
You must be superuser to copy and paste to /bin file system.
Next select View>Extra Panel
Third step go into Home>Downloads adt-bundle-linux-x86.zip
Unzip and extract file
Now Open extracted folder adt-bundle-linux-x86>sdk>platform-tools
The folder above is where you will find both adb and fastboot just drag and drop them into /bin
Must also get Supersu.zip
As well as ClockworkMod
Ready to Unlock Bootloader, flash image and gain Root access.
Type:
1. adb reboot bootloader = will show if any items are unlocked will be in red writing.
Unlock Bootloader
2. fastboot oem unlock - will unlock bootloader and flash information. Means you lose the data.
Root Device
1. adb reboot bootloader - at this point the bootloader should be in red because it is unlocked.
2. sudo fastboot flash recovery '/home/unityman/Downloads/recovery-clockwork-6.0.2.0-mako.img'
What should follow is
sending 'recovery (7804 KB)... OKAY
writing 'recovery'... OKAY
This point proceed to Clockworkmod by selecting it with the up and down volume
When in Clockworkmod select from sdcard again use up and down arrows and power button to confirm selection.
It should load the SuperSu.zip and show you have superuser permissions. Not when reboot SuperSu will ask if you want to grant su permissions select yes.
Note for ubuntu users. Because you loaded foreign terminal commands such as adb and fastboot. U will get error msg something wrong with file system. Nothing happens Ubuntu just complains about error in file system. I've ignored message and updated ubuntu twice.
Well got to run and load Ubuntu emulator
Cheers!
Happy Holidays
PS. What the biggest misunderstanding between linux and android is we don't grant Su or root permissions permanently. We grant superuser or temporary root permissions. Could you imagine if every person got onto your personal computer had root access system would be toast in 10 mins.
Thanks for the write up bro. I just wanted to point out that adb and fastboot are natively supported in Ubuntu 12.10.
Sent from my Nexus 4 using Tapatalk 2
culaterout said:
Note read other installation methods for windows and mac. This might help fill in the blanks.
I know us linux users don't understand all the wordy talk in android so I will be short and specific.
Because adb and fastboot are not native to ubuntu or any linux distro you must place these executable files in /bin or /usr/bin folder.
Open terminal type sudo Nautilus.
You must be superuser to copy and paste to /bin file system.
Next select View>Extra Panel
Third step go into Home>Downloads adt-bundle-linux-x86.zip
Unzip and extract file
Now Open extracted folder adt-bundle-linux-x86>sdk>platform-tools
The folder above is where you will find both adb and fastboot just drag and drop them into /bin
Must also get Supersu.zip
As well as ClockworkMod
Ready to Unlock Bootloader, flash image and gain Root access.
Type:
1. adb reboot bootloader = will show if any items are unlocked will be in red writing.
Unlock Bootloader
2. fastboot oem unlock - will unlock bootloader and flash information. Means you lose the data.
Root Device
1. adb reboot bootloader - at this point the bootloader should be in red because it is unlocked.
2. sudo fastboot flash recovery '/home/unityman/Downloads/recovery-clockwork-6.0.2.0-mako.img'
What should follow is
sending 'recovery (7804 KB)... OKAY
writing 'recovery'... OKAY
This point proceed to Clockworkmod by selecting it with the up and down volume
When in Clockworkmod select from sdcard again use up and down arrows and power button to confirm selection.
It should load the SuperSu.zip and show you have superuser permissions. Not when reboot SuperSu will ask if you want to grant su permissions select yes.
Note for ubuntu users. Because you loaded foreign terminal commands such as adb and fastboot. U will get error msg something wrong with file system. Nothing happens Ubuntu just complains about error in file system. I've ignored message and updated ubuntu twice.
Well got to run and load Ubuntu emulator
Cheers!
Happy Holidays
PS. What the biggest misunderstanding between linux and android is we don't grant Su or root permissions permanently. We grant superuser or temporary root permissions. Could you imagine if every person got onto your personal computer had root access system would be toast in 10 mins.
Click to expand...
Click to collapse
Thanks for the guide. I used this on my Ubuntu 12.10 box.
A few notes:
- I had to do add "sudo" for fastboot oem unlock so:
Code:
sudo fastboot oem unlock
- fastboot and adb are part of Ubuntu now as mentioned above, so I just installed using
Code:
sudo apt-get install android-tools-fastboot
sudo apt-get install android-tools-adb
Thanks again!
Thanks guys. I just successfully installed CWM and rooted my phone using the combination of your instructions.
I agree. Simple and clear instructions. Thanks for writing this up.
I downloaded the Android ADT package for Linux x64 (I run Debian Wheezy/Testing). Google distributes this as a zip, and it includes ADB etc, along with eclipse to start developing apps. I want to do that at some point so decided to download the whole thing. The problem though is that while the Eclipse binary included in the package is built for x64, adb and other tools are instead built for i386. So if you ./adb in the platform-tools directory, you will get a 'file or directory not found' error. To fix this -
Code:
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install ia32-libs
You should now be able to execute adb, fastboot etc. I also recommend creating symlinks in the /usr/bin or similar for the tools you use frequently.
Please do never ever use sudo nautilus !!!
This might override the rights of some of your ~/ directory.
Use gksu/ gksudo instead.
Sent from my Nexus 4 using xda app-developers app
Nexus 4 Root via Linux Notes
I rooted my Nexus 4 with my Linux machine (Linux Mint) earlier today. I had a couple hiccups, notably:
If you download the 64-bit/x86_64 version of ADT (Android Developer Tools, i.e. adb/Eclipse/etc. for Android development), the executable tools such as adb and fastboot are actually 32-bit. If you have a relatively fresh Linux install, you need to install the 32-bit executable binaries (see note below). Otherwise you will get strange errors even though the files are marked executable.
I sometimes had issues with my computer connecting to the phone via USB, especially after rebooting the phone. I found simply swapping USB ports (switching between the mouse and the phone, for example) would cause the phone to be recognized again.
Otherwise the process was smooth.
Here are the notes I collected as I searched the forums and web for how to root the phone in case they are helpful to someone. They're not really in any particular order; it's just a collection of what I found.
I used the following instructions:
http://makegadgetswork.blogspot.com/2013/01/root-nexus-4-on-linux-mint-13-and.html
Code:
# It had been so long since I used my personal Linux box that I
# forgot the root password :).
# Reset root password and main user password
http://community.linuxmint.com/tutorial/view/339
# Boils down to:
1) Enter grub by holding down shift key during boot.
2) Change:
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=[letters and numbers]\[letters and numbers] ro quiet splash vt.handoff=7
to:
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=[letters and numbers]\[letters and numbers] rw init=/bin/bash
# In x86_64 disto of ADT (Android Developer Tools), ADB libs are 32-bit.
#
# Running the 32-bit libs without 32-bit support will cause strange errors
# such as 'adb: No such file or directory'
#
# Here is how to install 32-bit binary runtime support on your 64-bit OS:
apt-get install ia32-libs
# Also install Java:
apt-get install sun-java6-jdk
# How to mount Nexus 4 in Linux
http://forum.xda-developers.com/showthread.php?t=2004182
# How to backup phone prior to unlocking (unlocking will cause a factory reset)
http://forum.xda-developers.com/showpost.php?p=34744848&postcount=4
# Linux root guide (this is what I followed)
http://makegadgetswork.blogspot.com/2013/01/root-nexus-4-on-linux-mint-13-and.html
# Another good root guide (Windows oriented)
http://forum.xda-developers.com/showthread.php?t=2018179
# Linux root guide on XDA
http://forum.xda-developers.com/showthread.php?t=35217628
# Root guides (didn't really use these)
http://www.cultofandroid.com/23782/rooting-the-google-nexus-4-the-right-way-how-to/
http://forum.xda-developers.com/showthread.php?t=2010312&highlight=+waiting+for+device+
# How to fix Android devices not recognized by ADB
# (check that ~/.android is not owned by root)
http://www.tuxtrix.com/2013/03/how-to-fix-android-devices-not.html
# SuperSU download link:
http://download.chainfire.eu/282/SuperSU/
# CWM link:
http://www.clockworkmod.com/rommanager
# Setup device support for N4
sudo vi /etc/udev/rules.d/51-android.rules
# My /etc/udev/rules.d/51-android.rules
> cat /etc/udev/rules.d/51-android.rules
#LG - Nexus 4 - MTP (mount as media device)
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
# Bootloader Nexus 4
SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4ee0", MODE="0660", OWNER="ankit"
# Normal Nexus 4
SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4ee1", MODE="0660", OWNER="ankit"
# Debug & Recovery Nexus 4
SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4ee2", MODE="0660", OWNER="ankit"
# Aliases to mount device as MTP
alias n4_mt 'sudo mtpfs -o allow_other /media/nexus4'
alias n4_umt 'sudo umount /media/nexus4'
# File that contains USB/device settings for N4
/etc/udev/rules.d/51-android.rules
# Restart devices
sudo service udev restart
# Print USB devices
lsusb
# Print ADB help
adb
# Print connected devices
adb devices
# Print device serial number
adb get-serialno
# Print device state
adb get-state
# Restart ADB server
adb kill-server ; adb start-server
# Restore sdcard backup
adb push ~/n4_bak_7_28/sdcard /sdcard/
# Reboot device to bootloader mode (needed to run fastboot)
adb reboot bootloader
# Reboot device to recovery (needed for flashing partitions (i.e. custom recovery, ROM)
adb reboot recovery
# Restore backed up data
adb restore ~/n4_bak_7_28/backup.ab
# Run shell on device
adb shell
# Show devices connected to fastboot
sudo fastboot devices
# Unlock phone (must be running in bootloader mode)
sudo fastboot oem unlock
# Flash custom recovery
sudo fastboot flash recovery /home/femtodude/install_adb/adt-bundle-linux-x86_64-20130717/sdk/platform-tools/recovery-clockwork-touch-6.0.3.4-mako.img

Adding Accounts to Friends(Twitter andFacebook) WORKS

Connect your Ubuntu touch device to you Linux/Windows/Mac Box.
Open up the Terminal/Command Line
type adb root and then adb shell
*On Ubuntu Touch*
Open system setting -> accounts
*on Your Box*
enter one of these
sudo uoa-create twitter <your twitter handle>
sudo uoa-create facebook <your facebook id>
It should prompt a login page for whichever service you have choosen.
Have Fun.
blmvxer said:
Connect your Ubuntu touch device to you Linux/Windows/Mac Box.
Open up the Terminal/Command Line
type adb root and then adb shell
*On Ubuntu Touch*
Open system setting -> accounts
*on Your Box*
enter one of these
sudo uoa-create twitter <your twitter handle>
sudo uoa-create facebook <your facebook id>
It should prompt a login page for whichever service you have choosen.
Have Fun.
Click to expand...
Click to collapse
Nobody ever said anything to this. Wonder if anyone got this working. I didn't. I'll post an image of what I got when entering the command.
With the latest update it works with the settings app.
Update your Ubuntu with the commands: sudo apt-get update && sudo apt-get upgrade

[GUIDE] Hosting A Live Wordpress Site On A Raspberry Pi Zero

How to host a WordPress website from home on a Raspberry Pi Zero.
You will need:
-A Raspberry Pi
-A wireless adaptor
-A bit of time
This guide assumes you already have Raspbian running on your Pi.
All commands can be run over ssh but you will need to VNC into it
a bit later. So you could also do all of it through VNC if you wish.
WARNING:
This is a fun little project but it's not advised to run a website
from your home network. If you miss-configure something or don't keep
things updated on your Pi the risk is greater than if you use a
web hosting service because if your Pi gets compromised, the attacker
now has a full Linux distro already authenticated on your network.
The risk of this actually happening is about as low as getting mugged.
It's not likely but...better safe than sorry.
Now for the good bit:
Ssh to your Pi, change the default password to a strong one and lets get started:
Install apache2:
$ sudo apt-get install apache2 -y
$ sudo apt-get install apache2-util
install mysql and php:
$ sudo apt-get install mysql-server php5-mysql -y
(mysql will prompt you for setup)
Restart apache:
$ sudo service apache2 restart
Move to this directory:
$ cd /var/www/
create a new folder:
$ sudo mkdir wordpress
Move to the new directory:
$ cd wordpress
Get wordpress:
$ sudo wget http://wordpress.org/latest.tar.gz
Extract wordpress:
$ sudo tar xzf latest.tar.gz
Move the contents of the wordpress folder to the current directory:
$ sudo mv wordpress/* .
Delete the now empty folder and the tar:
$ sudo rm -rf wordpress latest.tar.gz
Set perms:
$ sudo chown -R www-data: .
Create a database:
$ mysql -uroot -p (this assumes username is root and will prompt for password)
$ create database WordPress;
Forward port 80 to your Pi:
There is no 'one way' to do this. it depends on what router you have.
If you don't know how to do it, use Youtube and Google to find out how.
What you want to do though is forward port 80 to your Pi's LAN adress.
(the adress you used to ssh to the Pi).
Note: Some internet service providers block traffic on port 80 by
default so you may need to use different ones. If thats the case you might
also need to setup apache differently.
Get a domain name:
Go to a freedns site(https://freedns.afraid.org/) and register a subdomain to
your Pi's EXTERNAL IP adress. You can find your external address by visiting
'whatismyip.com' however this requires a screen so you will have to enable VNC
on your Pi by typing '$ sudo raspi-config' and going to the 'advanced' menu.
You then need a VNC viewer on the computer you are setting this up from. So type
'$ sudo apt-get install xtightvncviewer' then connect to you Pi by typing
'$ vncviewer the.Pi.lan.ip:5901'.
Next we need to point apache to the right directory for Wordpress because
you may have noticed that at the moment your subdomain just takes you
to the apache startup page.
$ sudo nano /etc/apache2/sites-enabled/000-default.conf
This will open a config file. Make sure the directory listing in there
is pointing to your Wordpress directory and add your site alias within
the virtual host tags. It should look something like this:
<VirtualHost *:80>
# blah blah blah
# blah blah blah
# blah blah blah
ServerAdmin [email protected]
DocumentRoot /var/www/wordpress
ServerAlias yoursubdomain.here.com
#My changes
<Directory "/var/www/wordpress">
AllowOverride All
</Directory>
# blah blah blah
# blah blah blah
# blah blah blah
/VirtualHost>
press ctrl+o to save it. Hit enter to confirm then exit by
pressing ctrl+x
Now we need to install Wordpress.
In a browser type you Pi's LAN IP address and Wordpress will guide you
through the installation and setup.
(leave the database host as localhost when prompted)
Now we need to change the URLs in the database we created to
the URL of our subdomain.
For this you need to install PHPmyadmin:
$ sudo apt-get install phpmyadmin
You will be prompted to configure it and you will need to put
database username and password in.
The installation process actually adds the phpMyAdmin Apache
configuration file into the /etc/apache2/conf-enabled/ directory,
where it is automatically read.
The only thing we need to do is explicitly enable the php5-mcrypt
extension, which we can do by typing:
$ sudo php5enmod mcrypt
Afterwards, you'll need to restart Apache for your changes to be recognized:
$ sudo service apache2 restart
You can now access the web interface by visiting:
http://localhost/phpmyadmin (through vncviewer) or
http://lan_ip_of_Pi/phpmyadmin(from another machine on the network)
From here, once logged in, you should be able to see a collapsed directory
tree on the left side of the page. One of the databases listed here
should be named 'wordpress'. expand it by pressing the '+' then
click on 'wp_options'. Now in the main window you should see a
table with various entries. The ones we are interested in are
the ones named 'siteurl' and 'home'. Click the edit button to the
left of them and change the value of both of them to:
'http://YOUR_DOMAIN_HERE.com.'
Now there is just one last place to change the URLs.
In the browser of a machine on the same network as your Pi go to the
LAN IP of your Pi adding '/wp-admin' at the end. Log in with the
details you supplied during the setup. At the top of the page you will
now see an admin toolbar. Hover over the icon that looks like a dial
and click on 'dashboard'. When it loads the side bar, scroll down to
'settings' and select 'general'. Here you change 'Wordpress address URL'
and 'site address URL' to your shiny new domain name.
Voila! You should now have a live to the world Wordpress site
running off a cheap home server, with no hosting costs.
This guide 'should' get you all the way to a live site but there
is a chance that extra configuration is needed or that I forgot
something.
Similar steps can be used for all kinds of different servers. If You just want to serve files straight from an apache index style page you can follow this guide, missing out the wordpress stuff and leaving your apache configs alone. Implementing htaccess you can also password protect your files or a folder. If you do this I highly recommend not adding a directory listing for the folder that is 'private'. even if it is password protected.
Enjoy!!

Kali linux in Redmi Note 3- chroot and LXDE Desktop

Running Kali linux shell in Redmi Note 3 by 'chroot'-ing into it after mounting on data/local/mnt folder. Also using VNC to access the LXDE Desktop GUI.
It will run within a virtual machine on your phone alongwith the Android as well.
Required Files-
(Phone must be rooted)
1. Kali 1.0(moto) Image
https://sourceforge.net/projects/li...ux/kalilinux.BASIC.ext4.20131012.zip/download
2. Kali script
https://drive.google.com/open?id=0B_Aq1GXA8aP4UWZOcVB6X1lJUjQ
3. Busybox Installer, Termial Emulator, VNC Viewer- Download from Play Store
Steps for installing for 1st time:
1. Download kalilinux.BASIC.ext4.20131012.zip and Kali script and place them in the root of internal sdcard.
2. Install "Busybox" from Playstore. Then open it and Install Busybox 1.25.1.
3. Install "Termial Emulator" and open it.
4. In "Termial Emulator", type and press enter each time as follow-
i) su
ii) mount -o rw,remount /dev/block/bootdevice/by-name/system /system
ii) cp /sdcard/kali /system/bin/kali
iv) chmod 755 /system/bin/kali
v) kali install
That's all. First time and one time set-up is done, now no need to repeat any step later.
Running and Stoping the linux ( after 1st time set-up):
1. To enter into Kali's shell, Open "Termial Emulator" anytime and type "su" and then "kali start". To Exit type "exit".
2. To enter into Kali's LXDE Desktop, in "Termial Emulator" type "su" and then "kali vnc".
Now minimize or exit "Termial" and open VNC viewer.
Then enter following fields to enter desktop
address-127.0.0.1
port-5901
pass-kalilinux
To stop vnc server, Open "Termial Emulator" anytime and type "su" and then "kali vncstop".
3. To uninstall or exit the shell and all services, Open "Termial Emulator" anytime and type "su" and then "kali stop".
NB. To fix old kali keyring
Run in kali shell (after st set-up)
i) rm -rf /var/lib/apt/lists
ii) apt-get update
iii) apt-get install kali-archive-keyring
Here is the video guide
I think this works on all smartphones (?)
Inviato dal mio SM-G935F utilizzando Tapatalk
Francesco0301 said:
I think this works on all smartphones (?)
Inviato dal mio SM-G935F utilizzando Tapatalk
Click to expand...
Click to collapse
Yes, for all. But remounting system command is different, may be not needed.
For remounting system as rw in redmi note 3
"mount -o rw,remount /dev/block/bootdevice/by-name/system /system"
So...is it possible to run airmon-ng or aircrack-ng to hack Wifi password on RN3?
We already have Kali nethunter ROM 😀
MyStyle0714 said:
So...is it possible to run airmon-ng or aircrack-ng to hack Wifi password on RN3?
Click to expand...
Click to collapse
Yes, but with external wifi dongle, not with inbuilt wifi..
Will upload video if I got dongle
Rishabh1x said:
We already have Kali nethunter ROM 😀
Click to expand...
Click to collapse
Yes, and that is better. But it can be run in any android version and anytime by a simple command. It is very simple and handy..
So...where to buy @
MyStyle0714 said:
So...where to buy @
Click to expand...
Click to collapse
one D-Link 150 mbps dongle supported monitor mode.
But I do not own it now.
Google the wifi chip which support monitor mode, then buy dongle.
Pleasee help
When i run kali install command it become like this. Help me. I'm noob in linux command.
Can that's file and step worked with redmi note 4?
We've to place Kali.zip or kali script in the root folder?
palbadi said:
Running Kali linux shell in Redmi Note 3 by 'chroot'-ing into it after mounting on data/local/mnt folder. Also using VNC to access the LXDE Desktop GUI.
It will run within a virtual machine on your phone alongwith the Android as well.
Required Files-
(Phone must be rooted)
1. Kali 1.0(moto) Image
https://sourceforge.net/projects/li...ux/kalilinux.BASIC.ext4.20131012.zip/download
2. Kali script
https://drive.google.com/open?id=0B_Aq1GXA8aP4UWZOcVB6X1lJUjQ
3. Busybox Installer, Termial Emulator, VNC Viewer- Download from Play Store
Steps for installing for 1st time:
1. Download kalilinux.BASIC.ext4.20131012.zip and Kali script and place them in the root of internal sdcard.
2. Install "Busybox" from Playstore. Then open it and Install Busybox 1.25.1.
3. Install "Termial Emulator" and open it.
4. In "Termial Emulator", type and press enter each time as follow-
i) su
ii) mount -o rw,remount /dev/block/bootdevice/by-name/system /system
ii) cp /sdcard/kali /system/bin/kali
iv) chmod 755 /system/bin/kali
v) kali install
That's all. First time and one time set-up is done, now no need to repeat any step later.
Running and Stoping the linux ( after 1st time set-up):
1. To enter into Kali's shell, Open "Termial Emulator" anytime and type "su" and then "kali start". To Exit type "exit".
2. To enter into Kali's LXDE Desktop, in "Termial Emulator" type "su" and then "kali vnc".
Now minimize or exit "Termial" and open VNC viewer.
Then enter following fields to enter desktop
address-127.0.0.1
port-5901
pass-kalilinux
To stop vnc server, Open "Termial Emulator" anytime and type "su" and then "kali vncstop".
3. To uninstall or exit the shell and all services, Open "Termial Emulator" anytime and type "su" and then "kali stop".
NB. To fix old kali keyring
Run in kali shell (after st set-up)
i) rm -rf /var/lib/apt/lists
ii) apt-get update
iii) apt-get install kali-archive-keyring
Here is the video guide
Click to expand...
Click to collapse
I don't understand where to copy those two files plz explain to me....
silentacker said:
I don't understand where to copy those two files plz explain to me....
Click to expand...
Click to collapse
Extract kali.rar file the copy these files "kali" and "kalilinux.BASIC.ext4.20131012.zip" into Sdcard/ root directory

Native OpenSSH and BASH for Android

Hi! In short this is for everybody who need openssh server and bash. Fill free to enjoy this port
How to use:
1. install zip trought recovery
2. boot into android, do remount system partition rw
3. setup password trought terminall emulator using command "passwd"
4. do remount system partition ro
5. generate ssh keys trought terminal emulator using command "ssh-keygen -A"
6. start sshd trought terminal emulator using command "/system/bin/sshd"
Username for things is sshd, password is one which you set.
Forget adb shell and enjoy openssh!

Categories

Resources