Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

How to reset root password in Ubuntu 10.10

In Linux and Unix, there is a SuperUser named Root but in windows Root is Administrators group. The SuperUser can do anything and everything, and thus doing daily work as the SuperUser can be dangerous. You could type a command incorrectly and destroy the system. Ideally, you run as a user that has only the privileges needed for the task at hand. In some cases, this is necessarily Root, but most of the time it is a regular user.

Reset Ubuntu Password:

To reset Ubuntu password follow the steps, it is very simple and easy to reset the password.

1. Reboot your machine and press alternatively shift+esc key. Now the grub menu will display.

2. Select the recovery mode from grub menu.



3. Now press 'e' to edit the grub menu and find out ro single



4. From the editing window replace ro single to rw init=/bin/bash



5. Now press ctrl+x. Now it will direct you into root directory without knowing the root password.



6. Change the root password by using the command given below.

passwd root



7. Now reboot your machine by the command given below.

reboot-f



8. Now Login as root and Enjoy ..............!!!!!!!!!!!!!

Friday, 25 November 2011 | posted in , | 0 comments [ More ]

Update Firefox to 8.0 in Ubuntu 10.10

In Ubuntu 10.10 the default version of Firefox browser is Firefox 4.0. To update Firefox to 8.0 in Ubuntu 10.10 follow the steps given below.

1. System --> Synaptic Package Manager --> Settings --> Repositors



2.Select Other Software tab --> Click Add a dialog box open as given below.



Type the following code and click Add Source.

ppa:mozillateam/firefox-stable

3. Reload the Synaptic Package Manager and Search for Firefox, Select Mark for Upgrade.



4.Now you can enjoy the Firefox 8.0.

Saturday, 19 November 2011 | posted in , | 1 comments [ More ]

Run Google Chrome as Root in Ubuntu 11.10

Google Chrome does not run in Ubuntu as root, while run Google Chrome as root it will display a error message as shown below.




To run Google Chrome as root in Ubuntu follow the steps given below.

1. Open the file google-chrome in any text editor.

/opt/google/chrome/google-chrome

2. Remove the last line as given below.

exec -a "$0" "$HERE/chrome" "$@"

3. At the same place add the line given below.

exec -a "$0" "$HERE/chrome" "$@" --user-data-dir $HOME

Now save the file and open Google Chrome, it will run asroot.



Enjoy .............!!!!!!!!!!!!!!!!!

Saturday, 12 November 2011 | posted in , | 2 comments [ More ]

Shutdown System Automatically in Ubuntu

In this post we can see how to shutdown the system automatically, ie daily at particular time or once in a week days or once in a month. To shutdown the system follow the steps given below.

1. First need to install a package. The package can installed by using terminal.

sudo apt-get install cron

2. Open text editor and write the script as given below,

Shutdown Daily

To shutdown the system daily, copy and past the script in text editor and save file name as root in the directory given below.

/var/spool/cron/crontabs/filename

# minutes  hrs, dayofmonth, month, dayofweek command

55 13   *  * * /sbin/shutdown -h now

The above code will shutdown the system daily at 1:00 Pm.

Shutdown Weekly once

To shutdown the system once in a week, copy and past the script in text editor and save file name as root in the directory given above.

# minutes  hrs, dayofmonth, month, dayofweek command

00 13  *  * 0 /sbin/shutdown -h now

The machine will shutdown every Sunday 1:00 Pm.

Same as Sunday we can shutdown the machine Monday, Tuesday, Wednesday,Thursday,Friday,Saturday and Sunday. For this change the value from 0 to 6 for this in the same script.

00 13  *  * 0 /sbin/shutdown -h now #shutdown Sunday at 1:00 Pm

55 8   *  * 1 /sbin/shutdown -h now #shutdown Monday at 8:55 Am

55 3  *  * 2 /sbin/shutdown -h now #shutdown Tuesday at 3:55 Am

55 3  *  * 3 /sbin/shutdown -h now #shutdown Wednesday at 3:55 Am

55 6  *  * 4 /sbin/shutdown -h now #shutdown Thursday at 6:55 Am

55 4  *  * 5 /sbin/shutdown -h now #shutdown Friday at 4:55 Am

55 2  *  * 6 /sbin/shutdown -h now #shutdown Saturday at 2:55 Am

the value range from 0 - 6,

0 -----> Sunday

1 -----> Monday

2 -----> Tuesday

3 -----> Wednesday

4 -----> Thursday

5 -----> Friday

6 -----> Saturday

Note :

1. The file name must named as root.

2. Save the root file in the directory given below

/var/spool/cron/crontabs/

Thursday, 10 November 2011 | posted in , | 0 comments [ More ]

Basic Ubuntu Commands

1. Enable Root in Ubuntu

To enable root directory execute the following command in terminal.

sudo passwd root

2. Add New User

To add a new user account execute the following command in terminal.

sudo adduser username

3. Delete User Account

To delete the user account execute the following command in terminal.

sudo deluser username

4. Lock/Unlock the User Account

To lock the user account execute the following command in terminal.

sudo passwd -l username

To Unlock the user account execute the following command in terminal.

sudo passwd -u username

5. Change Permission for File

chmod is a Unix command that lets you tell the system how much (or little) access it should permit to a file. To change the permission you must login in root using su on terminal.

chmod 700 /directory/filename

6. Change Permission for Connection Editor

You can set permission to connection editor using chmod command. To change the permission you must login in root using su on terminal.

chmod 700 /usr/bin/nm-connection-editor

You can remove permission for connection editor by executing the following command in terminal.

chmod 777 /usr/bin/nm-connection-editor

7. Change Permission for Media

You can set permission to media using chmod command. To change the permission you must login in root using su on terminal. After executing the command all the USB connections are get locked.

chmod 700 /media/

You can remove permission for media by executing the following command in terminal.

chmod 777 /media/

8. Change Permission for Appearance

You can set permission to appearance using chmod command. To change the permission you must login in root using su on terminal. After executing the following command desktop background cannot be changed in normal user.

chmod 700 /usr/bin/gnome-appearance-properties/

9. Change Permission for Screensaver 
You can set permission to screensaver  using chmod command. To change the permission you must login in root using su on terminal. After executing the following command screensaver cannot be changed in normal user.

chmod 700 /usr/bin/gnome-screensaver-preferences/

10. Change Permission for Keyboard

You can set permission to keyboard preference  using chmod command. To change the permission you must login in root using su on terminal. After executing the following command keyboard preference cannot be changed in normal user.

chmod 700 /usr/bin/gnome-keyboard-properties

Wednesday, 9 November 2011 | posted in , | 2 comments [ More ]