Tutorials

How to allow users to execute sudo command in ubuntu

0
Your rating: None

If you have a user account that cannot make sudo command then it because it is not in sudoers list. You must add the user to sudoers list to allow sudo command. Sudoers list is located in /etc/sudoers

 

So open up the file with visudo command. You must use this command to edit this

burhan@burhan-desktop:$ sudo visudo

If you want to set user permission like root user add it below

# User privilege specification
root    ALL=(ALL) ALL

 

Change root user password in ubuntu using terminal( The short way)

0
Your rating: None

If you forget the root user password you can change with a simple tricky command in ubuntu. Login to your regular account. You should have the sudo comman available for your user account.

Now open the terminal and enter the command

sudo passwd

 

This will let you to change root account password as you used sudo! Now enter the new password and confirm. Yes! You are done Smile

How to add users and usergroup in ubuntu using terminal

0
Your rating: None

It is very easy to create new user account in ubuntu using terminal. Just follow adduser and addgroup command.

Here is an example

I want to create a user named "nutch" with a new "nutch" user group. Here is how I did it.

First create the user group

burhan@burhan-desktop:/usr/share$ sudo addgroup nutch
Adding group `nutch' (GID 1002) ...
Done.

 

Now create the user account within the user group

Learn meaning of http response codes

0
Your rating: None

What is http response code?

http response codes are some numbers sent to browser from server each a http request is made. Each of them has different meanings. They tells you how server response to the request url. Here is a details of all the available http codes.

 

3 important settings to make with custom php.ini

0
Your rating: None

PHP.INI is the php configuration file that server uses. It makes lots of settings in an web server. It may include your site base directory, include path, temporary directory, timezone and lots of different php varaibles. Most of them are set by web hosts and you cannot make any change of them unless your are the host owner. But some setting you must make to let your site run smoothly and securely. So we must override some settings by putting an php.ini file. This will allow you to override some configurations of your host.

Create tree view in webpages using Google Visulaization Api

0
Your rating: None

Today I am going to tell you about how to create a tree view or binary tree view in webpage using some apis like Google Ajax Api (Visualization Api)

Clean URLs by removing /index.php/ from urls in codeigniter

0
Your rating: None

In codeigniter you can easily use very search engine friendly urls.

By default it is shown as

http://www.yoursite.com/index.php/controller_name/function/id

You can easily remove this disgusting index.php from your urls.

 

Create htaccess file

Create an .htaccess file in your ci root directory and enter the following codes

Compress css files using php - Coding

0
Your rating: None

This tutorial has been continued from here

If you dont understand reasons for this coding read it first before continue

 

CSS Compression USING PHP

I have written a php class that will merge, minify and compress the css file. Optionaly it can also gzip the css using zlib. I am going to explain my coding here today.

Compress css files using php - Benifits

0
Your rating: None

Have you ever noticed the css files from giants like google, yahoo or facebook. If you look at them you will see they are very tightly coded no space, tabs or line breaks yet a very large css file. How they manage it to debug when it is not human friendly to view the code.

 

Execute shell command on server using php

0
Your rating: None

Accessing shell command in server may not be available for you at all due to security reasons. But still you can access it using php since this will give you some extra features and time saving efforts. One of the example is to creating backup of your files. You might want to create backup of your files in gz format. But you may not have this feature in your cpanel or being banned by your hosting company. If you can make access to the shell of your server and execute tar command who can stop you from??!!