How To Change Password On Ubuntu


today I will show you how you can change password on Ubuntu. There is two ways to do that:
1) From command line
2) From GUI

1) Change Ubuntu user password from command line

To change your password from command line, you must use command passwd
See the example below:

nikola@nikola-XPS-M1530:~$ passwd
Changing password for nikola.
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

In this example I change my password.

2) Change Ubuntu user password from GUI
To change your password from GUI follow this step:
Click on System -> Preferences -> About Me
In the right upper corner, there is button change password. Click on it and fill up the “Change password” window.

That’s all.Good luck

Posted in Linux, Ubuntu at October 27th, 2011. No Comments.

Assigning multi options to drop down in Zend framework

Today I will show you how to add multi options to select tag. It is simple, just add this code to your controller.

    public function testAction() {
        //we are creating Zend_Form instance
        $dropdown = new Zend_Form_Element_Select("dropdown");
        //set label for select tag
        //set options
            "Select 1", "Select 2", "Select 3", "Select 4"
        //add form to the view
        $this->view->form = $form->addElement($dropdown);

And in the view of the controller, show the form.

echo $this->form;

If you check the code, you will see this:

<select name="dropdown" id="dropdown">
    <option value="0" label="Select 1">Select 1</option>
    <option value="1" label="Select 2">Select 2</option>
    <option value="2" label="Select 3">Select 3</option>
    <option value="3" label="Select 4">Select 4</option>

If you want to specify the values of option tags then use this array:

“1” => “Select 1”,
“2” => “Select 2”,
“3” => “Select 3”,
“4” => “Select 4”

And the result will be:

<select name="dropdown" id="dropdown">
    <option value="1" label="Select 1">Select 1</option>
    <option value="2" label="Select 2">Select 2</option>
    <option value="3" label="Select 3">Select 3</option>
    <option value="4" label="Select 4">Select 4</option>

And that’s all. Good luck.

Posted in Php, Zend Framework at October 15th, 2011. No Comments.