Roshan Book

My Tech Notebook

Category Archives: Ubuntu

Solving : net usershare add: cannot convert name “Everyone” to a SID + unexpected information received

Today while sharing my Public folder , I was getting this error:

“net usershare add: cannot convert name “Everyone” to a SID + unexpected information received”.

Agter searching for a while, I found solution which worked from here : http://ubuntuforums.org/showthread.php?t=1982137

 

[1] Do not ever use gadmin-samba again for as long as you live.

[2] Purging the “samba” package will not resolve your discombobulated smb.conf file since that file doesn’t come from the “samba” package.

[3] Restore a factory fresh copy of smb.conf:

(**) Make sure the following file exists: /usr/share/samba/smb.conf

(**) Make a backup of your current smb.conf

Code:
  sudo cp /etc/samba/smb.conf /etc/samba/smb.confMOD

(**) Start with a fresh one:

Code:
sudo cp -a /usr/share/samba/smb.conf /etc/samba/

(**) Correct one mistake in the new one:
Find the line:

Quote:
encrypt passwords = false

and change it to:

Quote:
encrypt passwords = true

(**) Restart samba

Code:
sudo service smbd restart

Short course on Aptitude package manager

Source :
install software for your system, with needed dependencies as well:

sudo aptitude install

remove packages as well as orphaned dependencies:

sudo aptitude remove

remove packages and orphaned dependencies, as well as any configuration files left behind:

sudo aptitude purge

search for packages in the local apt package lists:

sudo aptitude search package-name

show details about a package:

sudo aptitude show package-name

update the local packages lists:

sudo aptitude update

upgrade any installed packages that have been updated:

sudo aptitude upgrade

upgrade packages, even if it means uninstalling certain packages:

sudo aptitude dist-upgrade

delete only out-of-date packages, but keep current ones:

sudo aptitude autoclean

delete any downloaded files necessary for installing the software on your system:

sudo aptitude clean

fix a package at it’s current version, and don’t update it:

sudo aptitude hold

How to Install Webmin on Ubuntu 11.10/11.04 Server

Source: http://www.upubuntu.com/2011/09/how-to-install-webmin-on-ubuntu.html

Webmin is a web-based interface based on Perl for system administration under Unix-based systems. With Webmin, you can easily set up, via your web browser, new user accounts, manage disk quotas, configure files, control the Apache server as well as MySQL and PHP. In this guide, we will see how to install Webmin on a server running Ubuntu 11.04 or 11.10.

Webmin Installation

Before we start, you should first install the LAMP web server on your system. Now follow these instructions to install Webmin on Ubuntu 11.10/11.04:

1. Open the Terminal and run this command:

sudo gedit /etc/apt/sources.list

At the end of the file, add these two lines, then save and close:

deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib

2. Import now the GPG key using these commands:

wget http://www.webmin.com/jcameron-key.asc
sudo apt-key add jcameron-key.asc
sudo apt-get update

3. Install now Webmin with this command:

sudo apt-get install webmin

Accessing Webmin

To start Webmin, open this address using your web browser:

https://ubuntu:10000/

To login to webmin, you need to use your root account details. If you still haven’t assigned a password to your root account, then create a root password using this command via the terminal:

sudo passwd

Enter a new password, then resubmit it to confirm. Then use your root account access details to login to webmin.

 

To restart Webmin, use this command:

sudo /etc/init.d/webmin restart

That’s it!

 

How To Install The GTK3 Mac OS X Lion Theme On Ubuntu 11.10

Source: http://www.upubuntu.com/2011/11/how-to-install-gtk3-mac-os-x-lion-theme.html

In this tutorial we are going to help you install the GTK3 Mac OS X Lion theme for Ubuntu 11.10 Oneiric Ocelot. This will make Ubuntu 11.10 look like the new Mac OS X Lion OS. This theme is created by MBOSSG at deviantART.

A- Mac OS X Lion Theme Installation

1. Installing Cursors

Open the terminal and run these commands:

wget http://dl.dropbox.com/u/47950494/Mac-Lion-Cursors.tar.gz
sudo tar -xzvf Mac-Lion-Cursors.tar.gz -C /usr/share/icons

2. Downloading The Theme

[Note]: If you have already a “.themes” folder at your home directory, then skip the fisrt command.

Run these commands:

mkdir ~/.themes
wget http://dl.dropbox.com/u/47950494/Mac-Lion-Theme.tar.gz
tar -xzvf Mac-Lion-Theme.tar.gz -C ~/.themes

3. Installing Icons:

[Note]: If you have already an “.icons” folder at your home directory, then skip the fisrt command.

Run these commands:

mkdir ~/.icons
wget http://dl.dropbox.com/u/47950494/Mac-Lion-Icons.tar.gz
tar -xzvf Mac-Lion-Icons.tar.gz -C ~/.icons


B- Enabling The MAC OS X Lion Theme

Method 1

Install first GNOME Tweak Tool with this command:

sudo apt-get install gnome-tweak-tool


Launch GNOME Tweak Tool and in the Theme tab, enable these options then reboot:

Cursor theme > Mac-Lion-Cursors
Icon theme > Mac-Lion-Icons
GTK+ theme > Mac-Lion-Theme
Window theme > Mac-Lion-Theme

Method 2:

Or run simply these commands from the terminal:

gsettings set org.gnome.desktop.interface gtk-theme ‘Mac-Lion-Theme’

gsettings set org.gnome.desktop.interface icon-theme ‘Mac-Lion-Icons’

gconftool-2 –set –type string /apps/metacity/general/theme ‘Mac-Lion-Theme’



Screenshots:

 

 

Enjoy!


Add New Comment

Optional: Login below.

Image

Showing 5 of 15 comments

Make you own private cloud

Source: http://netsentries.com/create-your-own-private-cloud-with-eyeos/


Today I want to introduce you one of the most amazing light weight cloud based operating system known as eyeOS. eyeOS is a cloud based operating system which can be accessed from any where , think about your desktop from everywhere any device , your documents , files & applications on the web , that means your files on your private cloud.It is a complete open source offering , simply speaking it a light weight OS that can be accessed from anywhere through a web browser , currently there are two options to start with eyeOS.

It is a complete open source offering , simply speaking it a light weight OS that can be accessed from anywhere through a web browser , currently there are two options to start with eyeOS.

1. eyeOS 1.x stable


2. eyeOS 2.x beta


eyeOS 1.9 is equipped with

* More than 250 applications from eyeOS community

* 35 available languages &

* To be used in production environments


eyeOS 2.x includes live collaboration and many more social capabilities than eyeOS 1.x & is soon going to replace the 1.x

In this article we are going to install eyeOS 1.9 stable over ubuntu 10.10 32 bit OS , so sit back , relax & watch the art in detail.

Prerequisites


In order to install eyeOS we need to have the following first in your linux distro

.

  • Apache HTTP Server 2.x
  • MySQL-server and MySQL-client 5.x
  • & PHP5.2 or higher

Apache HTTP Server 2.x


Install Apache 2 in your ubuntu 10.10 as shown below.

Fig -1

MySQL-server and MySQL-client 5.x


Install mysql client in your linux distro as shown below.

Fig -2

Install mysql server as shown below.

Fig -3

You need to enter a password for the administrative user of mysql server , type in a password of your choice.

Fig -4

PHP  5.2, or higher


Install php as shown in your linux distro.

Fig – 5

eyeOS installation


Now it is time for us to get in to the real installation of eyeOS , download eyeOS 1.x stable version from their site.

http://www.eyeos.org/downloads/

Extract the eyeos1.x.zip to our website directory & assign chmod 777 to eyeos directory.

Fig – 6

From the console type

sudo chown -R www-data.www-data /var/www/eyeOS

&

sudo chmod 750 -R /var/www/eyeOS

Fig -7

Restart your pc , go to the web browser & type http://127.0.0.1/eyeOS/install as shown below.

Fig – 8

Now it is time for you to set a password for the root user , you will also get an option to allow your end users to add their accounts themselves .

Fig -9

Fig -10

Now we have done with it , we are in eyeos Desktop as shown below.

Fig -11

Customizing the defaults.

The default upload size with eyeos is only 2 MB , you can change it to a value of your choice by editing the php.ini file at

/etc/php5/apache2/php.ini

In php.ini change upload_max_filesize & post_max_size values

Eg:

upload_max_filesize = 200M

post_max_size = 200M

Upload size changed to 200 MB now  as shown below.

Howto Install Mysql Database Server with Phpmyadmin Frontend

Source:http://www.ubuntugeek.com/howto-install-mysql-database-server-with-phpmyadmin-frontend.html

MySQL is a widely used and fast SQL database server. It is a client/server implementation that consists of a server daemon (mysqld) and many different client programs/libraries.

Installing Mysql database in Ubuntu

sudo aptitude install mysql-server mysql-client libmysqlclient15-dev

This will complete the installation of mysql server 5.0.45 in ubuntu gutsy.

Configuring Mysql in ubuntu

MySQL initially only allows connections from the localhost (127.0.0.1). We’ll need to remove that restriction if you wish to make it accessible to everyone on the internet. Open the file /etc/mysql/my.cnf

sudo gedit /etc/mysql/my.cnf

Find the line bind-address = 127.0.0.1 and comment it out

#bind-address = 127.0.0.1

You can check your configuration using the following command

#netstat -tap

Output Looks like below

tcp 0 0 *:mysql *:* LISTEN 4997/mysqld

MySQL comes with no root password as default. This is a huge security risk. You’ll need to set one. So that the local computer gets root access as well, you’ll need to set a password for that too. The local-machine-name is the name of the computer you’re working on. For more information see here

sudo mysqladmin -u root password your-new-password

sudo mysqladmin -h root@local-machine-name -u root -p password your-new-password

sudo /etc/init.d/mysql restart

Manage Mysql using Phpmyadmin

phpMyAdmin is a tool written in PHP intended to handle the administration of MySQL over the Web. Currently it can create and drop databases, create/drop/alter tables, delete/edit/add fields, execute any SQL statement, manage keys on fields, manage privileges,export data into various formats and is available in 54 languages. GPL License information.

Install phpmyadmin in ubuntu

sudo aptitude install phpmyadmin

This will complete the installation.

Now you need to goto http://serverip/phpmyadmin/

Login using your mysql root as username and password


 

How To Install Gnome Themes In Ubuntu 11.10

Source:http://www.addictivetips.com/ubuntu-linux-tips/how-to-install-gnome-themes-in-ubuntu-11-10-tip/

The complexity of GTK3 themes in Gnome 3 makes it a bit confusing to add desktop themes in Ubuntu 11.10.  This is because, there is no default tool to change Ubuntu 11.10 themes. However, you can change and manage Gnome themes in Ubuntu 11.10 with the help of a third-party application, known as the Gnome Tweak Tool. In this post, we will tell you how to install and manage Gnome 3 themes in Oneiric Ocelot.

To get started, install Gnome Tweak Tool. Once done, go to the Home directory, hit CTRL+H hotkey to show hidden files and folders, and create a new folder named .Themes via right-click context menu. Now, download your favorite Gnome 3 theme and extract it within the .Themes folder. You can download some Gnome 3 themes from the link given at the end of this post.

Change theme

Now, open the Gnome Tweak Tool from Applications –> Other –> Advanced Settings. Go to Themes section within the tool, and select the extracted theme from the drop down list. For example, you can select the GTK+, icon and Window themes to transform the look and feel of your Ubuntu desktop.

Gnome Tweak Tool

This will apply the selected Gnome theme. You can download and add a wallpaper to match your theme.

Theme

Download Gnome 3 Themes

Backing Up in Ubuntu

Source: http://www.psychocats.net/ubuntu/backup

One of the most frequent questions on the forums is “How do I back up in Ubuntu?”

Before I started using Ubuntu, I thought the best method was just to copy and paste files using the file manager (that’s one way, of course, but it has its limitations). I’m going to recommend a few popular methods. This list isn’t comprehensive—it just gives you some places to start. You can always investigate further once you’re more comfortable with Ubuntu.

Backing Up Personal Files
rsync is what I use for backing up personal files. I used to copy and paste files using the file manager, but that would involve taking about an hour to back up all my music and erase all the old copies. rsync gives me the ability to copy over only the files that have been modified or added since the last time I backed up. Now, backups take me only about fifteen seconds a week.

The most basic way to use rsync is like this (command goes into the terminal):

rsync -av /path/to/source/directory /path/to/target/directory

For example, let’s say your username is aliceand you wanted to back up your home directory to your external hard drive that mounts at /media/usbdrive, you would use the command

rsync -av /home/alice /media/usbdrive

If rsync doesn’t seem sophisticated enough for you, you can type

man rsync

to find more options than just -av. You can also explore rdiff-backup, which allows you to store (and restore) different date-stamped versions of the same file without taking up too much extra space. And, if you hate the command-line, try installing grsync, which is the graphical frontend to rsync. Here are some screenshots of grsync in action.

Backing Up Whole Installations
Not that System Restore is foolproof in Windows, but it’s still a nice feature… at least in theory. Right now, Ubuntu doesn’t have anything like System Restore. So if you’re worried an update (especially if you have unsupported or pre-release updates set to install) might break your perfect setup, it’s best to back up your system first.

tar is an archiving command, but it can also be used to archive your entire system into one little zipped up bundle. Someone on the Ubuntu Forums wrote a nice little HowTo on backing up and restoring your entire installation using tar.

ddrescue allows you to copy a partition byte for byte to another partition or to a .img file. It’s mainly designed for recovery of a crashed drive, but you can also use it as a way to back up (a non-graphical PartImage of sorts). The trick is that the name of the package is ddrescue in the repositories, but the command to use it is dd_rescue. So if you wanted to copy /dev/hda1 to /dev/sda1, you would type in the terminal:

dd_rescue /dev/hda1 /dev/sda1

Keep in mind that /dev/hda1 cannot be in use or mounted. If that requires you using a live CD, then so be it. You can also, if you don’t want to erase /dev/sda1 completely, ddrescueto an image file and then mount the image to get the files off it:

dd_rescue /dev/hda1 /dev/sda1/hda1backup.img
sudo mkdir /recovery sudo mount /dev/sda1/hda1backup.img /recovery

I don’t have a good tutorial on it, but Clonezilla also works well for backing up single partitions or entire drives.

My favorite web server setup, Ubuntu Server, LAMP, Webmin, and Virtualmin.

Source:http://www.patrickjwaters.com/blog/2011-07-13/my-favorite-web-server-setup-ubuntu-server-lamp-webmin-and-virtualmin/3524

Over the past few years I have experimented with different web server setups. I have found that the combination Ubuntu,  LAMP (Linux, Apache, Mysql, and PHP), Webmin, and finally Virtualmin provide many advantages in my day to day workflow as a web developer. This setup provides me with an easy to use and easy to maintain web server that lessens the time spent configuring the server and increases my time programming. Here are my step by step instructions for setting up my favorite server configuration.

Step 1: Install Ubuntu Server

Download and install Ubuntu Server edition. At the time of writing this 11.04 was the most current version. I prefer to use the most Current LTS release, so I will choose 10.04 for my install. When installing Ubuntu you can choose to install the LAMP stack if you wish and skip step 2. Just as a side note, the first time I set this up was on Ubuntu 8.04 and the steps have not really changed sense.

Step 2: Install LAMP

First change to the root user by typing the following and entering your password.

patrick@ubuntu:~$ sudo su

Then to install the LAMP package type the following

root@ubuntu:/# tasksel

This will prompt you with a screen like the this

Use the the arrow keys to highlight the LAMP Package and press space bar. Next hit tab to jump to the ok button and press enter.

During this process you will be prompted to enter a root mysql password. I recommend choosing a mysql root password different than your current root/user password. That is pretty much it for installing LAMP.

 

Step 4: Installing Webmin

Next we are going to install webmin. Webmin is a free peace of software that give you a web based interface for controlling different parts of your server. For example, if you wanted to change some php settings, you don’t have to ssh into the server and edit you php.ini. You can do it all through webmin. I am not going to give a thorough tutorial on webmin, but I do recommend poking around in it, once it’s installed.

So first step to installing webmin is adding it’s repo’s to the ubuntu. It doesn’t come in the prepackaged repos. So you are going to want to edit the file /etc/apt/source.list like so.

root@ubuntu:/# nano /etc/apt/sources.list

This will open a simple text editor. Use the arrow keys to get to the bottom of the file and add the following lines

deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib

Then hit cntrl-x and they y and then enter, to save the file.

Next run the following

root@ubuntu:/# cd /root/
root@ubuntu:~# wget http://www.webmin.com/jcameron-key.asc
root@ubuntu:~# apt-key add jcameron-key.asc
root@ubuntu:~# apt-get update
root@ubuntu:~# apt-get install webmin

This will now install webmin to your server. Once webmin is installed you can access it at https://YOUR.IP.ADDRESS:10000 (ex. https://192.168.1.100:10000) take note of the https. You will probably get a warning about the certificate note being trusted, this is ok. This happen because your https certificate is not signed by a company like veri-sign. Now go the that url and you should get a screen like so

You are going to now login with your root user and password. Note that Ubuntu does not set a password for the root user by default. You can do that by changging to the root user and typing ‘passed’ and setting your password.

Once you log in you will get a screen like so

 

You have no successfully installed webmin! Click around there a lot of awesome features!

 

Step 5: Install Virtualmin

Next we are going to install a webmin module called Virtualmin. Virtualmin is a module that turns your server into a multi domain hosting platform. It organizes your websites files and folders automatically. It does a whole bunch of configuration automatically for you, like creates the necessary apache host files, creates a mysql database, and creates a linux user with ssh access. This is the module that I use the most. I rarely need to ssh into the server to mess with configuration. I can setup websites in seconds, it’s a big time saver. So here is how you install Virtualmin. I have to admit the first time I installed it, it was a bit tricky, but I have done it so many times now, that I know all of the gotcha’s and I hope this will make the process smooth for others as well.

Alright so you need to be logged into webmin and at the home screen. You will need to go and click on and expand ‘wbemin’ in top left hand corner and then click on ‘Webmin Configuration’ like so.

Next click on the ‘Webmin Module’

Now go to this link http://www.webmin.com/vdownload.html and look for the ‘Webmin Module Format’ link. It will be a link that looks like this, but the version may have changed http://download.webmin.com/download/virtualmin/virtual-server-3.87.gpl.wbm.gz.

Once you have that link you are going to want to go back to the webmin configuration page you were at before and check the radio button labeled ‘From ftp or http URL’ and paste the link in the corresponding text field and click ‘Install Module’.

 

Step 6: Configure Virtualmin

Virtualmin is now installed but needs to be configured. First we need to install apache2-suexec-custom. You need this so virtualmin can change apache’s default directory to /home

root@ubuntu:~# apt-get install apache2-suexec-custom
root@ubuntu:~# cd /etc/apache2/suexec
root@ubuntu:/etc/apache2/suexec# nano www-data

replace the line “/var/www” with “/home” (without “” ). hit control-x then y then enter

root@ubuntu:/etc/apache2/suexec# apache2ctl restart

 

Next we need to set the MySQL root password in webmin. if you click on Servers > MySQL Database Server on the left hand side and enter ‘root’ for the login and your mysql password. Remember this is not your linux password, it’s your mysql password that you set when installing LAMP.

 

Next we need to turn on some apache modules. Goto to Servers > Apache Webserver. You will see a 3 tabs click on ‘Global configuration’ and then lastly click on ‘Configure Apache Module’. Now you are going to want to make sure you check ‘actions’, ‘suexec’, and ‘rewrite’ and click ‘Enabled Selected Modules’.

 

Next you are going to want to click on Servers > Virtualmin Virtual Servers (GPL). This will take you to a Post Installation Wizard. You do not want to run through the wizard.  You are going to want to push cancel. This will take you to a screen like so and you are going to want to push ‘Manage Enabled Features and Plugins’

Next we are going to turn OFF some features of Virtualmin. I have found that I only use a few key features and other features require further configuration. Uncheck  ‘BIND DNS domain’, ‘Mail for domain’,  and ‘Webalizer reporting’.

Finally click save and you will be taken to the new Vitualmin Configuration screen. You have now successfully installed Virtualmin!

Step 7: Setting up a website with Virtualmin

The next thing to do is add a new website/virtual server with virtualmin. Navigate to Server > Virtualmin Virtual Server (GPL). Next look for a button that says ‘Add New Virtual Server Owned By:’ and click that.

 

This will bring you to a new screen with a form. Enter in the domain you want to host on your server, without the www, and enter an administrator password. This is all that is required, you can thumb through the other options, but you do not need to change anything else. Once you have the form filled out click ‘Create Server;.

When you clicked create server Virtualmin did the following

-Created a new linux user on your server that you use to ssh and sftp into.

-Created a mysql database named the same as your domain without the ‘.com’ or ‘.org’ etc.  For example if the domain you created was test.com, then Virtualmin would create a database called ‘test’.

-Created a new folder structure on the server. For example if you created test.com, you can navigate to /home/test/. Here you will find a folder called ‘public_html’. This is your web root folder.

How to install webmin on ubuntu 11.04 (Natty) server

Source: http://www.ubuntugeek.com/how-to-install-webmin-on-ubuntu-11-04-natty-server.html

Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like /etc/passwd, and lets you manage a system from the console or remotely.

Install webmin on ubuntu 11.04 (Natty) server

 

We have already discussed how to install ubuntu 11.04 LAMP server now we will install webmin for easy administartion

Edit /etc/apt/sources.list file

sudo vi /etc/apt/sources.list

Add the following lines

deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib

Save and exit the file

Now you need to import GPG key

wget http://www.webmin.com/jcameron-key.asc

sudo apt-key add jcameron-key.asc

Update the source list

sudo apt-get update

Install webmin

sudo apt-get install webmin

Now you need to access webmin using http://serverip:10000/ once it opens you should see similar to the following screen

%d bloggers like this: