Saturday, October 6, 2007

Samba Comfiguration

Configuring SAMBA

You may configure the SAMBA server by editing the /etc/samba/smb.conf file to change the default settings or add new settings. More information about each setting is available in the comments of the /etc/samba/smb.conf file or by viewing the /etc/samba/smb.conf manual page from the prompt with the following command typed at a terminal prompt:

man smb.conf 


Prior to editing the configuration file, you should make a copy of the original file and protect it from writing so you will have the original settings as a reference and to re-use as necessary.

Backup the /etc/samba/smb.conf file:

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.original 

Now, edit the /etc/samba/smb.conf file and make your changes.

Error in compiling

Somehow I assumed that I would be able to compile a basic C program on any linux box - I mean unices are useful like that, right? So I was a bit surprised when I decided to compile a bit of C just now and was faced with the following errors:

arvind@lovely:gcc-4.1 try.c -o try.out

try.c:1:18: error: stdio.h: No such file or directory
try.c:2:22: error: sys/types.h: No such file or directory
try.c: In function ‘main’:
try.c:5: warning: incompatible implicit declaration of built-in function ‘printf’

So what kind of unix comes with make and a compiler, but none of the required dev libraries and headers required to make any normal C program work? Well a brief google yielded the following solution.. Yup, you guessed it.. you need to install a dev package:

sudo apt-get install build-essential

it works...........

Installing SAMBA

At the prompt enter the following command to install the SAMBA server applications:

sudo apt-get install samba 

To mount Windows filesystems using SMB, you will also need smbfs. Enter the command:

sudo apt-get install smbfs 

Error like E:Unable to check......

If you are tired with the error like

E: Could not get lock /var/lib/apt/lists/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the list directory
on updating or anything like arvind@lovely:~$ sudo apt-get update

then do the following

1-) sudo chmod 777 /var/lib/apt/lists/

then delete or cut and paste the lock file in another place and then try

2-) sudo apt-get update

there will error free updating or any processing...........

Friday, October 5, 2007

New To J2ME

New to J2ME....dont worry it is really great for you now....
just click and download the book for beginners

beginning J2ME: From Novice to Professional

Thursday, October 4, 2007

Key Combination For BASH Script

Key or key combinationFunction
Ctrl+AMove cursor to the beginning of the command line.
Ctrl+CEnd a running program and return the prompt, see
Ctrl+DLog out of the current shell session, equal to typing exit or logout.
Ctrl+EMove cursor to the end of the command line.
Ctrl+HGenerate backspace character.
Ctrl+LClear this terminal.
Ctrl+ZSuspend a program, see
ArrowLeft and ArrowRightMove the cursor one place to the left or right on the command line, so that you can insert characters at other places than just at the beginning and the end.
ArrowUp and ArrowDownBrowse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.
Shift+PageUp and Shift+PageDownBrowse terminal buffer (to see text that has "scrolled off" the screen).
TabCommand or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.
Tab TabShows file or command completion possibilities.

Basic Terminal Command for Beginners

aproposSearch information about a command or subject.
catShow content of one or more files.
cdChange into another directory.
exitLeave a shell session.
fileGet information about the content of a file.
infoRead Info pages about a command.
logoutLeave a shell session.
lsList directory content.
manRead manual pages of a command.
passwdChange your password.
pwdDisplay the current working directory.

Tuesday, October 2, 2007

TELNET (TELetype NETwork) is a network protocol used on the Internet or local area network LAN connections.

The telnetd program (telnet server) is a server which supports the DARPA telnet interactive communication protocol. Telnetd is normally invoked by the internet server inetd or xinetd for requests to connect to the telnet port as indicated by the /etc/services file. Usaually telnet listen on port TCP port 23.

Telnet in is insecure protocol and it is recommended that you use ssh server. But some time you really need telnet then first install telnet server as according to version of Linux distribution.
Telnet server installation

Debain/Ubuntu Linux user type the following command:
# apt-get install telnetd
$ sudo apt-get install telnetdFedora Linux user the following command:
# yum install telnet-server telnetRed Hat enterprise Linux user type the following command:
up2date telnet-server telnetFreeBSD user type the following command:
No need to install new (telnet server) package, it is installed by default (/usr/libexec/telnetd)
Configure telnet server (turn on telnet server)

Again each distribution has its own method to turn on or off telnet service; same applies to telnet UNIX/Linux server.

If you are using Red Hat / Fedora Linux
The configuration file for telnet is /etc/xinetd.d/telnet. To enable telnet server you need to open this file and make sure disable = no read as disable = yes.
# chkconfig telnet onTo start telnet server type command:
# /etc/init.d/xinetd restartIf you are using Debian Linux
The configuration file for telnet is /etc/inetd.conf. By default it is enabled when you install telnet server. To start telnet server type command:
# /etc/init.d/inetd restartIf you are using FreeBSD
The configuration file for telnet is /etc/inetd.conf. Open file using vi text editor and uncomment line:
# vi /etc/inetd.conf
Make sure commented line:
#telnet stream tcp nowait root /usr/libexec/telnetd telnetdRead as follows:
telnet stream tcp nowait root /usr/libexec/telnetd telnetdSave and close the file. Start telnet service:

Enable inetd service so that telnet get loaded:
# vi /etc/rc.confAppend/add following line to configuration file:
inetd_enable="YES"Save and close the file, Rsstart telnet via inetd service:
# /etc/rc.d/inetd restart
Telnet to server (How do I use telnet client?)

You should now be able to telnet to the server from Windows or Linux desktop system. Type the following command to connect to Telnet server:telnet server-ip-address

Add to Technorati Favorites

Monday, October 1, 2007

Using Apache Server

If you are web programmer and you are trying to run your php file in have to install apache server.
you can search the required application by : sudo apt-cache search apache
and then install the package as : sudo apt-get install package name;
sudo apt-get install apache2
and also install these for running php : sudo aptitude install php5
sudo aptitude install libapache2-mod-php5

and for mysql use : sudo apt-get install phpMyAdmin

to restart the apache server : sudo /etc/init.d/apache2 restart

and your www directory will be at : /var/www

and at default : http://localhost/apache2-default
and to run phpmyadmin : http://localhost/phpmyadmin

Sunday, September 30, 2007

Installing some .exe program in ubuntu

for this first install wine : sudo apt-get install wine
then copy and paste the .exe file with additional file in a folder and do
wine path of the file with filename.exe in terminal
wine /home/arvind/cbuilder/setup.exe
if error like
E: dpkg was interrupted, you must manually run 'dpkg --configure -a'
to correct the problem.
during installation configure dpkg as : sudo dpkg --configure -a
and then sudo apt-get update

Howto resolve the lock in aptitude issue?

sudo aptitude update

if error like:
E: Could not get lock /var/lib/apt/lists/lock - open (11 Resource temporarily unavailable)
E: Couldn't lock list directory..are you root?

then try the folowing:
1.sudo killall aptitude synaptic update-manager
2. sudo lsof /var/lib/apt/lists/lock
3. sudo apt-get clean

if synaptic is broken then do : sudo apt-get install -f
it will install the queue packages and then synaptic works

install program in easy way

The easiest way to install applications in Ubuntu is to use the Synaptic Package Manager (which you can find in the menu in System>Administration>Synaptic Package Manager). This is the first place to go when you are looking for a program. Do not fall into the old Windows ways of going on the web and looking for an installer - most of the apps you will ever need are available in the Ubuntu package repositories. (See the section on repository configuration to really add some variety to Synaptic.) For an excellent visual guide to all the different ways of installing software on ubuntu.

or by command line in terminal :
sudo apt-get install package name
sudo aptitude install package name