Login as Root in Ubuntu 11.04 (Natty Narwhal)

This simple tutorial shows you how to login as root (administration) in Ubuntu 11.04 Natty. Even though it’s not recommended to logon to Ubuntu as the administrator, you still have the option to do so if you wish. One big reason why most Linux distributions won’t allow the root user to login is that, root or administrator has complete control of the system. Any small mistake might have huge impact on the stability of your system. So to prevent this, the root account is disabled by default.

Getting started:

To get started,  press Ctrl – Alt – T on your keyboard to open Terminal. Next, type the command below to create a new password for the root user.

sudo passwd root

unlock_root_natty

After that, type the command below to unlock the root account.

sudo passwd -u root

unlock_root_natty_1

Next, Log Out.

unlock_root_natty_2

Then select ‘Other’ and type the username ‘root’ and the password you created for the root user.

unlock_root_natty_3

Enjoy!

unlock_root_natty_4

Its for modifying the bcdedit.exe from command line of windows 7.
I generally wrote it for multi boot option modification.
—–Note: Don’t forget to open Command prompt as “Administrator”.  Just right click the command prompt and click “Run as Administrator”.

Command-line Help

bcdedit /? Shows all commands one is able to use

bcdedit.exe /? CREATESTORE Shows detailed information for the command CREATESTORE or any other command available in bcdedit as shown when running bcdedit /? followed by the particular command more information is required for.

bcdedit or bcdedit /enum all Shows the current structure of your boot configuration data.
The GUID tags {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} of all Windows installations present on your computer will be displayed.

Create a Backup

It is strongly recommended that one creates a backup of the BCD store before making any changes to it.

bcdedit /export “D:\BCD Backup\Bcd Backup” Creates a backup to a pre-created folder, in this case “BCD Backup” on drive D:

bcdedit /import “D:\BCD Backup\Bcd Backup” Restores the backup previously created

Making Changes to the Boot Configuration Data

Before making any changes or attempting to use the commands below, run the command bcdedit or bcdedit /enum all to make sure that you use the correct GUID tag. These have been seen to change from build to build and it may be necessary to use {ntldr} instead of{legacy} for example.

bcdedit /set {legacy} Description “Windows XP Professional SP2″ Changes the text description of the “Legacy” OS line in the boot menu. The quotation marks must be included in the command

bcdedit /set {current} description “Windows Vista Build 5270 x86″ Changes the text of the boot menu line for the Vista or non-Vista installation one is currently booted to, from the default “Microsoft Windows” or other description to that shown in the quotation marks

bcdedit /set {current} description ”any name” …. for changing to any name you want.

bcdedit /set {5189b25c-5558-4bf2-bca4-289b11bd29e2} description “Windows Vista Build 5270 x64″ Changes the text of the boot menu line for any other Vista installation. One must use the GUID for that particular installation as shown when one runs thebcdedit or bcdedit /enum all command

bcdedit /default {current} Sets the current Windows installation one is booted to as the default Windows boot OS

bcdedit /default {5189b25c-5558-4bf2-bca4-289b11bd29e2} Sets the referenced Windows OS as the {default} Windows boot OS

bcdedit /default {legacy} Sets the legacy (Windows XP) OS as {default} boot item

bcdedit /displayorder Sets the display order of boot menu items for example:

bcdedit.exe /displayorder {legacy} {current}

bcdedit /timeout 15 Changes the default 30 second time-out of the boot menu to 15 seconds or any other value inserted.

Correcting changes to the Partition/Disk structure

Where a partition or a hard drive has been added or removed and has caused the partition/disk structure to change, this can be corrected by running these commands in the order shown:

X:\>X:\boot\fixntfs.exe -lh -all (Where X: is the drive/partition on which the folder “boot” is to be found)

bcdedit /set {5189b25c-5558-4bf2-bca4-289b11bd29e2} device partition=X: Changes boot partition of the OS whose GUID is indicated. (Where X: is new drive/partition required). Must be used together with the osdevice command below

bcdedit /set {5189b25c-5558-4bf2-bca4-289b11bd29e2} osdevice partition=X: Changes boot partition of the OS whose GUID is indicated. (Where X: is new drive/partition required). Must be used together with the device command above

Msconfig – System Configuration Utility

The System Configuration Utility (msconfig) is accessible from the Windows Vista start menu, Start>All Programs>Accessories>System Tools>System Configuration. It has limited funcionality as regards the BCD store however, with the only relevant functionalities being to change the default boot operating system, to delete a boot menu item and to change the timeout display period of the boot menu.

CAUTION: Making incorrect or invalid changes to one’s BCD store can result in the system no longer booting and only those comfortable with using command line entries and who understand the inherent risks of making a mistake should do so.

Advanced Options

Please do not run these commands unless you know what the outcome will be.

bcdedit /set {current} numproc 2

bcdedit /set {current} removememory 0

For information on editing the BCD (Boot Configuration Data) when installing a “legacy” Operating System AFTER Windows Vista see How To: Modify BCD using bcdedit when install XP after Vista

The welcome screen displays all of the local users on the system, except the built-in administrator account that was created during setup. If we want to hide a specific user from the list, we need to create a special value under this registry key:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
NT\CurrentVersion\Winlogon\SpecialAccounts\UserList

Under this key you simply create a new DWORD value – the name matches the users name exactly, and the value is one of the following (Decimal format)

0 – Hides the user just from the welcome screen
1 – The user is shown

Before you start putting values in this key, I want to warn you. This tip is particularly dangerous. If you make the wrong move, you could make it nearly impossible to get back into your system. Don’t blame me if you hose your system!

 

To hide the users I want, I browse to the registry key on my system:

Now I want to hide all of the accounts except Jennifer, so I add each of the accounts shown on the welcome screen, and give them a value of zero.

that’s all we need to do. I log off, and now I only see Jennifer’s account:

Here’s the big question. How do you log on as a hidden user? If you are running windows XP Professional you simply need to press CTRL-ALT-DEL twice, and the standard logon screen will be displayed. This has one pitfall – it will fail to work if a user is still currently logged in. If you are having trouble getting it to show, then reboot and press it twice before any users have logged in. Secondly, if you are running Windows XP Home, you will need to boot in safe mode to use the hidden account. The CTRL-ALT-DEL trick does not work for XP Home.

Have a laptop and want to get more battery life out of it? Windows 7 includes a hidden built-in tool that will examine your laptop’s energy use and make recommendations on how to improve it. To use it:

1. Run a command prompt as an administrator. To do this, type cmd in the search box, and when the cmd icon appears, right-click it and choose “Run as administrator.”

2. At the command line, type in the following:

powercfg -energy -output \Folder\Energy_Report.html

where \Folder represents the folder where you want the report to be placed.

3. For about a minute, Windows 7 will examine the behavior of your laptop. It will then analyze it and create a report in HTML format in the folder you specified. Double-click the file, and you’ll get a report — follow its recommendations for ways to improve power performance.

This guide is divided into 3 steps: installing/tesing Apache, PHP and finally MySQL.

Lets start with Apache:
1. Open the terminal (we will be using it through most of my guide) from Applications > Accessories > Terminal
2. Install apache2 using apt-get by typing the following

sudo apt-get install apache2

Note that you should know the root password.
Now everything should be downloaded and installed automatically.
To start/stop apache2 write:
sudo /etc/init.d/apache2 start
sudo /etc/init.d/apache2 stop

Your www folder should be in: /var/www/

If everything is OK you should see an ordinary HTML page when you type: http://localhost in your firefox browser

Finished with Apache ? lets conquer PHP:
1. Also in terminal write:
sudo apt-get install php5 libapache2-mod-php5

or any php version you like
2. restart apache
sudo /etc/init.d/apache2 restart

This is it for PHP :D
Wanna test it ? Just create an ordinary PHP page in /var/www/ and run it.
Example:
sudo gedit /var/www/test.php

and write in it: < ?php echo “Hello World”; ?>

Now run it by typing http://localhost/test.php in firefox… You should see your ” Hello World ”
66 % is over, lets continue to installing MySQL:
1. Again and again in terminal execute:
sudo apt-get install mysql-server

2. (optional) If you are running a server you should probably bind your address by editing bind-address in /etc/mysql/my.cnf and replacing its value (127.0.0.1) by your IP address

3. set your root password (although mysql should ask you about that when installing)
mysql> SET PASSWORD FOR ‘root’@’localhost’ = PASSWORD(‘xxxxxx’);

4. Try running it
mysql -uroot -pxxx

where xxx is your password.
Note: You can install PHPMyAdmin for a graphical user interface of MySQL by executing
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin

5. restart apache for the last time
sudo /etc/init.d/apache2 restart

Congratulions your LAMP system is installed and running :D

For installing/running phpmyadmin.

sudo apt-get install phpmyadmin

The phpmyadmin configuration file will be installed in: /etc/phpmyadmin
Now you will have to edit the apache config file by typing
sudo vi /etc/apache2/apache2.conf

and include the following line:
Include /etc/phpmyadmin/apache.conf

Restart Apache
sudo /etc/init.d/apache2 restart

Another issue was making mysql run with php5
First install these packages:
sudo apt-get install php5-mysql mysql-client

then edit php.ini and add to it this line : ” extensions=mysql.so” if it isnt already there
sudo vi /etc/php5/apache2/php.ini

Restart Apache
sudo /etc/init.d/apache2 restart

for editing text files …. see “vi” editor guide …… you can download from here,
–> click here:   vi Guide

Here is some of the documentation for using “vi” editor for Ubuntu users

vi Editor

Here are some of the TERMINAL commands that you will need always to perform any task in linux,

su : Super User rights from within the terminal
sudo : super user run this command             [  "sudo su"  for ubuntu  ]
ls : list directory contents
ls -lis : list directory content is list view
cd : change directory
cd /dirname : jump change a directory
apt-get install : gets app from web and installs [NOTE from dannyboy: I would use aptitude, it keeps track of dependencies and when you uninstall stuff it takes the dependencies with it, apt-get DOESN'T do this!]
apt-get remove : uninstalls app [same here]
apt-get update : updates the DB [same here]
clear : clears screen
./filename : processes a install command
mkdir : creates a directory
chmod 777 dirname : resets access rights to directory [i don't know what you mean by resets access right, chomd will make the dir readable, writable, and executable i thought?]
kill 999 : kills process at high level
reboot : reboots system
exit : exits from terminal or moves back a userlevel
make : comlies package code
make install : installs the compiled code
uname -r : gives you the kernel version
dir : will list all directories within your current location
cat filenamehere : will display it’s contents
pwd : will show you your current location (very important if you’re usincli ftp)
cp oldfilename newfilename : copies a file
mv oldfile newfile : will overwrite the oldfile with the newfile
chown usernamehere dirnamehere : changes the dir owner to whoever you put
chgrp groupnamehere dirnamehere : changes the group who owns the dir

man ls # will give you information about ls

tar -xf
Extracts the contents of most tar.** archives.

apt-cache search ****
Searches the apt database for packages with names or descriptions similar to ****

apt-cache show ****
Shows information on package ****, for example “apt-cache show unzip”.

df -h
Shows mounted filesystems and space usage infomation for them.

du -hs /path/to/directory/
Shows the size of the contents of the specified directory.

–>Having an & at the end of the command line sends this process to the background (you regain the prompt to type more commands). If you type a command followed by && and then another command (i.e. $command1 && command2) the second command will only be started when the first one is finished

Few links for better more learnings,

An A-Z Index of the Linux BASH command line

Alphabetical Directory of Linux Commands

Linux Shortcuts and Commands:

For web developers, this link will help installing LAMP on Linux in a proper way so all updates are enable for apache, PHP and MYSQL.

LINK :
Installing LAMP on Ubuntu  (Linux,Apache,MySQL,PHP)
Installing best PHP editor for Ubuntu.
Emacs   

Link:  http://riddell.us/EmacsOnUbuntu.html

1.) Navigate to C:\Program Files\Common Files\Adobe\Adobe PCD
restart adobe cs5 trial delete PCD file

Adobe Common Files PCD Location

2.) Delete the file named “pcd”

3.) Open the “cache” folder

4.) Delete the file named “cache”

5.) Edit your “Hosts” file to prevent your Adobe CS5 programs from communicating with Adobe.

Editing your hosts file is a relatively easy task (See image below). Navigate to Computer -> Local Disk (C:) -> Windows -> System32 -> Drivers -> etc -> hosts. Or you can simply type “hosts” into the search bar when you are inside the folder “System32?.

You will need to change the security of the hosts file in order to edit it. Right click it, select properties and then select the security tab. You will need to grant regular users “Full Control” in order to edit this file.

WARNING: You should remove these full control privileges from the regular users group after editing the file for system security purposes.

Add the following lines to the bottom of the file:

127.0.0.1 activate.adobe.com
127.0.0.1 practivate.adobe.com

This essentially tells your computer that when you attempt to navigate to either activate.adobe.com or practivate.adobe.com, rather than being directed to those addresses, your computer will loop that navigation back to itself, and your Adobe programs will fail to reach the adobe activation destination. “127.0.0.1? is your computers own loopback IP address.
edit windows hosts file for adobe activation

Click for full size

I’m actually not sure if that whole hosts file editing part is absolutely necessary, but it doesn’t seem like it could hurt. I’m not sure if Adobe attempts to keep track of trial users on their end.

Now the next time you open an Adobe CS5 program, you will be prompted to accept the license agreement and start a new trial.