Posted by: isaraffee | April 21, 2010

Exploring ssh between Vector Linux and Ubuntu

Exploring ssh between Vector Linux and Ubuntu

ssh server: Ubuntu

ssh client: Vector linux

Configure IP address on Ubuntu

# ifconfig eth0 172.16.0.2 netmask 255.255.0.0 broadcast 172.16.255.255 up

Configure IP address on Vector

Go to /etc/rc.d

vi rc.inet1

Change the IP address as required

Quit and save

Restart the network interface

/etc/rc.d/./rc.inet1 restart

Verify it

ifconfig eth0

Check that both hosts can ping to each other

Check sshd running on Ubuntu

root@ismail-laptop:/etc# ps -ef|grep sshd

root 3457 1 0 14:22 ? 00:00:00 /usr/sbin/sshd

root 8430 7360 0 14:57 pts/1 00:00:00 grep sshd

Now ssh from Vector to Ubuntu

#ssh 172.16.0.2

After providing the password you should be able to ssh to Ubuntu SSH server.

Note:

In case you are unable to ssh into the Vector Linux ssh server, you can also try tostop the firewall service like this:

root:# cd /etc/rc.d

vector://etc/rc.d

root:# ./rc.firewall stop

Loading kernel modules …

error: “net.ipv4.tcp_syncookies” is an unknown key

net.ipv4.conf.all.rp_filter = 1

net.ipv4.icmp_echo_ignore_broadcasts = 1

net.ipv4.conf.all.accept_source_route = 0

net.ipv4.conf.all.secure_redirects = 1

net.ipv4.conf.all.log_martians = 1

Flushing Tables …

Firewall completely flushed! Now running with no firewall.

Then try to ssh again. You should be able to ssh to the remote host.

Posted by: isaraffee | April 21, 2010

Assgining IP address with a specific MAC address

Assgining IP address with a specific MAC address

Suppose our dhcp client has a MAC address of 00:11:85:77:d0:a7 and we want to fixed its IP address as 172.16.0.99. These are the steps:

Firstly on the DHCP server, edit the dhcpd.conf and add the following lines.

# cd /etc/dhcp3/

root@ismail-laptop:/etc/dhcp3# ls

dhclient.conf dhclient-enter-hooks.d dhclient-exit-hooks.d dhcpd.conf dhcpd.conf.bak

root@ismail-laptop:/etc/dhcp3# vi dhcpd.conf

#I add this

subnet 172.16.0.0 netmask 255.255.0.0 {

range 172.16.0.07 172.16.0.99;}

host examplehost {

hardware ethernet 00:11:85:77:d0:a7;

fixed-address 172.16.0.99;

}

Save and quit. Then restart the dhcpd service.

You can also run the following command

# service dhcp3-server restart

* Stopping DHCP server dhcpd3 [ OK ]

* Starting DHCP server dhcpd3 [OK].

On the dhcp client, in my case the Vector Linux, type:

#/etc/rc.d/./rc.inet1 stop

#/etc/rc.d/./rc.inet1 start

if it fail to obtain IP address then type:

#dhcpcd

This is the DHCP client daemon. Then check the IP address. It should now assign the IP address based on the MAC address.

# ifconfig eth0

eth0 Link encap:Ethernet HWaddr 00:11:85:77:D0:A7

inet addr:172.16.0.15 Bcast:172.16.255.255 Mask:255.255.0.0

UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1

Note

You can include the DNS server in the DHCP server

option domain-name-servers 172.16.0.2;
Posted by: isaraffee | April 21, 2010

Configuring DHCP server in Ubuntu Jaunty

Configuring DHCP server in Ubuntu Jaunty

DHCP server: Ubuntu

DHCP client: Vector linux

On DHCP server, install DHCP package

root@ismail-laptop:~# apt-get install dhcp3-server

<output truncated for brevity>

Setting up dhcp3-common (3.1.1-5ubuntu8.2) …

Setting up dhcp3-client (3.1.1-5ubuntu8.2) …

* Reloading AppArmor profiles … [ OK ]

Setting up dhcp3-server (3.1.1-5ubuntu8.2) …

Generating /etc/default/dhcp3-server…

* Reloading AppArmor profiles … [ OK ]

* Starting DHCP server dhcpd3 * check syslog for diagnostics.

[fail]

invoke-rc.d: initscript dhcp3-server, action “start” failed.

To check if the dhcp packages are installed, type:

# dpkg –list | grep dhcp

ii dhcp3-client 3.1.1-5ubuntu8.2 DHCP client

ii dhcp3-common 3.1.1-5ubuntu8.2 common files used by all the dhcp3* packages

ii dhcp3-server 3.1.1-5ubuntu8.2 DHCP server for automatic IP address assignm

Next on the DHCP server edit the configuration file. But before that I could never strees enough on making a backup copy of the original file.

root@ismail-laptop:~# cd /etc/dhcp3/

root@ismail-laptop:/etc/dhcp3# ls

dhclient.conf dhclient-enter-hooks.d dhclient-exit-hooks.d dhcpd.conf

root@ismail-laptop:/etc/dhcp3# cp -p dhcpd.conf dhcpd.conf.bak

Now edit the file and include the following lines:;

#i added the following

subnet 72.16.0.0 netmask 255.255.0.0 {

range 172.16.0.10 172.16.0.20;

}

The above entries said that to assign IP address in the range of 172.16.0.10 to 172.16.0.20 to a host (dhcp client).

Check that the DHCP server is running. And if changes were done on the configuration file, you have to restart the dhcpd service.

# cd /etc/init.d/

# ./dhcp3-server status

Status of DHCP server: dhcpd3 is not running.

Start the dhcpd server,

# ./dhcp3-server start

  • Starting DHCP server dhcpd3 [ OK ]

Configuring the dhcp client (Vector LInux)

Edit the network settings of the dhcp client. Change the DHCP value to “yes”

root:# cd /etc/rc.d

vector://etc/rc.d

root:# vi rc.inet1

## The settings

DEVICE=’eth0′

DHCP=’yes’

IPADDR=’172.16.0.1′

NETMASK=’255.255.0.0′

GATEWAY=’172.16.0.2′

PROBE=’no’

Save and quit. Then you need to restart the network services.

root:# ./rc.inet1 stop

Stopping network eth0 …

root:# ./rc.inet1 start

Starting network eth0 using a DHCP server…

dhcpcd: MAC address = 00:11:85:77:d0:a7

dhcpcd: your IP address = 172.16.0.10

eth0 Link encap:Ethernet HWaddr 00:11:85:77:D0:A7

inet addr:172.16.0.10 Bcast:172.16.255.255 Mask:255.255.0.0

UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1

RX packets:4 errors:0 dropped:0 overruns:0 frame:0

TX packets:1 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:671 (671.0 b) TX bytes:594 (594.0 b)

Interrupt:20

From the output, it shows that the dhcp client was assign the IP address of 172.16.0.10. Remember that we have assigned a range of IP addresses on the DHCP server i.e. IP addresses from 172.16.0.10 to 172.16.0.20.

Verify this IP address and check that you can now ping the DHCP server, and that the DHCP server can ping its clients.

root:# ping 172.16.0.2

PING 172.16.0.2 (172.16.0.2) 56(84) bytes of data.

64 bytes from 172.16.0.2: icmp_seq=1 ttl=64 time=0.213 ms

64 bytes from 172.16.0.2: icmp_seq=2 ttl=64 time=0.204 ms

Yes the dhcp client can ping the DHCP server

Try ping the dhcp client from the DHCP server

# ping 172.16.0.10

PING 172.16.0.10 (172.16.0.10) 56(84) bytes of data.

64 bytes from 172.16.0.10: icmp_seq=1 ttl=64 time=1.26 ms

64 bytes from 172.16.0.10: icmp_seq=2 ttl=64 time=0.202 ms

Yes this shows that the dhcp client can ping the DHCP server.

Next we are going to assign IP address based on a specificHardware MAC address.

Posted by: isaraffee | April 21, 2010

Starting NFS Server Automatically in Vector Linux

Starting NFS Server Automatically in Vector Linux

In my case the NFS server upon booting did not start automatically. I have to start it manually each time I booted up my server. To automatically start up NFS server service, you will need to edit the /etc/rc.d scripts.

On Vector Linux

Go to /etc/rc.d/rc4.d

root:# cd /etc/rc.d/rc4.d/

Create a script called S77nfsd (You can give it any name, but make sure the script name starts with Capital S, to indicate start of script. Script names that start with letter K means stopping or killing of service.)

The contents of my S77nfsd script are as follow:

root:# more S77nfsd

#!/bin/bash

cd /etc/rc.d

./rc.nfsd start

Save and quit, and remember to chmod to ugo+x

#chmod ugo+x S77nfsd

What we actually do is to place the script at runlevel 4 and the script will in this case start the NFS server service when the system reaches runlevel 4. Try to see if this works by rebooting the system.

In my case after I rebooted the system, NFS server service was started automatically. Do a ps -ef|grep nfs to check this.

Note:

In Vector Linux the sshd service is also not started by default when you booted up the system. You can also include a script which started the sshd service in the /etc/rc.d/rc4.d directory. You can call this script S99sshd and the contents of the script may look like the following:

#!/bin/bash

cd /etc/rc.d

./rc.sshd start

Again chmod ugo+x S99sshd so that the system can execute the script. That’s it. Try to reboot the system and when you have boot up, you can see that sshd service has started.

And please remember that in Vector Linux even though you started the SSH server service, you may at times unable to ssh to your Vector Linux SSH server. This is because of the firewall service. In my case I stop the firewall service to use ssh. Type:

#cd /etc/rc.d/

#./rc.firewall stop

Posted by: isaraffee | April 21, 2010

Configuring NFS on Ubuntu Jaunty

Configuring NFS on Ubuntu Jaunty

Check if the packages are install

root@ismail-laptop:/etc# dpkg –list | grep nfs

root@ismail-laptop:/etc# dpkg –list | grep portmap

If they are not install, then type:

apt-get install nfs-kernel-server nfs-common portmap

Creating config file /etc/default/nfs-kernel-server with new version

* Starting NFS common utilities [ OK ]

* Exporting directories for NFS kernel daemon… [ OK ]

* Starting NFS kernel daemon [ OK ]

Processing triggers for libc6 …

ldconfig deferred processing now taking place

Check if nfs and portmap are running:

root@ismail-laptop:~# ps -ef|grep nfs

root 30523 2 0 19:01 ? 00:00:00 [nfsd4]

root 30524 2 0 19:01 ? 00:00:00 [nfsd]

root 30525 2 0 19:01 ? 00:00:00 [nfsd]

root 30526 2 0 19:01 ? 00:00:00 [nfsd]

root 30527 2 0 19:01 ? 00:00:00 [nfsd]

root 30528 2 0 19:01 ? 00:00:00 [nfsd]

root 30529 2 0 19:01 ? 00:00:00 [nfsd]

root 30530 2 0 19:01 ? 00:00:00 [nfsd]

root 30531 2 0 19:01 ? 00:00:00 [nfsd]

root 30552 23453 0 19:01 pts/2 00:00:00 grep nfs

root@ismail-laptop:~# ps -ef|grep portmap

daemon 30114 1 0 19:01 ? 00:00:00 /sbin/portmap

root 30581 23453 0 19:01 pts/2 00:00:00 grep portmap

Edit the /etc/exports file and add the following

/root/Desktop/nfsshare 172.16.0.1/255.255.0.0(rw)

The IP address is the NFS client or clients. But in this case, my nfs client is the nfs server itself. This is because Vector was unable to participate as it is down for maintenance. Thus I have to make Ubuntu as the NFS client and server.

Restart the nfsd service

root@ismail-laptop:/etc/init.d# ./nfs-kernel-server restart

* Stopping NFS kernel daemon [ OK ]

* Unexporting directories for NFS kernel daemon… [ OK ]

* Exporting directories for NFS kernel daemon… exportfs: /etc/exports [1]: Neither ‘subtree_check’ or ‘no_subtree_check’ specified for export “172.16.0.0/255.255.0.0:/root/Desktop/nfsshare”.

Assuming default behaviour (‘no_subtree_check’).

NOTE: this default has changed since nfs-utils version 1.0.x

[ OK ]

* Starting NFS kernel daemon [ OK ]

root@ismail-laptop:/etc/init.d#

Mounting the NFS Share on the NFS Client

To mount the NFS share on the client , type:

root@ismail-laptop:~# mount -t nfs 172.16.0.1:/root/Desktop/nfsshare/ /mnt/share

Type mount to check that it is mounted

# mount

/dev/sda1 on / type ext3 (rw,relatime,errors=remount-ro)

<output truncated for brevity>

172.16.0.1:/root/Desktop/nfsshare/ on /mnt/share type nfs (rw,addr=172.16.0.1)

It shows here that the NFS share is mounted on the client at the /mnt/share directory.

You can access the NFS share by typing:

root@ismail-laptop:~# cd /mnt/share/

root@ismail-laptop:/mnt/share# ls

freeRecipex.txt

Edit the file

# vi freeRecipex.txt

hello world

we are from Mars, Grretings!

Check that the file contents are the same at /root/Desktop/nfsshare/ directory. This is at the NFS server.

root@ismail-laptop:~# cd /root/Desktop/nfsshare/

root@ismail-laptop:~/Desktop/nfsshare# less freeRecipex.txt

Yes, the contents are the same.

Auto Mount NFS Shares on Clients

To auto mount the NFS share when clients boot-up, you will need to edit the /etc/fstab file

root@ismail-laptop:~# cd /etc

root@ismail-laptop:/etc# cp fstab fstab.bak

root@ismail-laptop:/etc# vi fstab

In my case I have included the following lines:

172.16.0.1:/home/ismail /home/ismail nfs defaults 0 0

172.16.0.1:/portsmouth /mnt/portsmouth nfs defaults 0 0

Reboot the NFS client and check that the NFS shares are mounted

Note:

To mount the partitions that are in the /etc/fstab, you can also type:

#mount -a

All partitions will be mounted

Posted by: isaraffee | April 21, 2010

Issues on UIDs of NFS server and client

Issues on UIDs of NFS Server and Client

On the NFS client

root@ismail-laptop:~# grep ismail /etc/passwd

ismail:x:1000:1000:ismail,,,:/home/ismail:/bin/bash

On the NFS server

root:# grep ismail /etc/passwd

ismail:x:1001:100::/home/ismail:

The user has different UID on the server and at the client. Let’s see if this affect the file sharing

On the nfs client

# mount -t nfs 172.16.0.1:/home/ismail /home/ismail

#mount

172.16.0.1:/home/ismail on /home/ismail type nfs (rw,addr=172.16.0.1)

Access and try edit the files

On the client the user can view the file but unable to edit the file

SO now I will try to change the UIDs to 1001

On the client, I have to make some adjustment to the user who currently has UID 1001

# usermod -u 1005 idris

Now I assigned the user ismail UID with 1001

root@ismail-laptop:/home/ismail# grep ismail /etc/passwd

ismail:x:1001:1000:ismail,,,:/home/ismail:/bin/bash

Now the UID is the same let’s try to edit the shared file

ismail@ismail-laptop:~$ vi ismailfile

good job

yes I need to change the UID to edit the file

Yes the user can now edit the shared file.

Making NFS share called “portsmouth”

On the NFS server and in my case Vector Linux

root:# mkdir /portsmouth

root:# chmod 1777 /portsmouth/

root:# ls -ld /portsmouth/

drwxrwxrwt 2 root root 4096 2010-02-24 12:11 /portsmouth//

Now the portsmouth directory only allow users to edit their own file. Furthermore users cannot delete files that do not belong to them.

On the NFS server, again mine is Vecotr Linux, set up the directories to be shared.

root:# vi /etc/exports

/portsmouth 172.16.0.2/255.255.0.0(rw,root_squash)

Then type:

root:# exportfs -v -a

exporting 172.16.0.2/255.255.0.0:/root/Desktop/TopHits

exporting 172.16.0.2/255.255.0.0:/home/ismail

exporting 172.16.0.2/255.255.0.0:/portsmouth

Restart the NFS server

root:# ./rc.nfsd start

Starting RPC portmapper: /sbin/rpc.portmap

Starting RPC kernel lockd process: /sbin/rpc.lockd

Starting RPC NSM (Network Status Monitor): /sbin/rpc.statd

Starting NFS server daemons:

/usr/sbin/exportfs -r

/usr/sbin/rpc.rquotad

/usr/sbin/rpc.nfsd 8

/usr/sbin/rpc.mountd

Note that in my case I do not need to restart the portmap service

Now let’s configure NFS on Ubuntu. I will make Ubuntu as the NFS server and the NFS client.

The portmap script is found at /etc/rc.d/init.d

/./portmap

On the NFS client, make directory so that users will access their files.

root@ismail-laptop:/mnt# mkdir portsmouth

root@ismail-laptop:/mnt# ll portsmouth/

total 0

root@ismail-laptop:/mnt# ll -d portsmouth/

drwxr-xr-x 2 root root 4096 2010-02-24 14:41 portsmouth/

Now mount the share

root@ismail-laptop:~# mount -t nfs 172.16.0.1:/portsmouth /mnt/portsmouth/

root@ismail-laptop:~# mount

/dev/sda1 on / type ext3 (rw,relatime,errors=remount-ro)

<information truncated for brevity>

172.16.0.1:/portsmouth on /mnt/portsmouth type nfs (rw,addr=172.16.0.1)

Now try to create files and try to delete other users’ files

root@ismail-laptop:~# su – idris

idris@ismail-laptop:~$ pwd

/home/idris

idris@ismail-laptop:~$ cd /mnt/portsmouth/

idris@ismail-laptop:/mnt/portsmouth$ ls -l

total 8

-rw-r–r– 1 ismail ismail 5 2010-02-24 15:13 ismail_recipes

-rw-r–r– 1 ismail users 5 2010-02-24 15:11 ismail_secrets

idris@ismail-laptop:/mnt/portsmouth$ rm ismail_recipes

rm: remove write-protected regular file `ismail_recipes’? y

rm: cannot remove `ismail_recipes’: Operation not permitted

User idris cannot remove ismail’s files

Note

The sticky bit is set on the NFS server, not the client

This is what it looks like on the NFS server

root:# ls -ld portsmouth/

drwxrwxrwt 2 root root 4096 2010-02-24 15:13 portsmouth//

And after you mount on the client, it appears that the sticky bit is set automatically by NFS

idris@ismail-laptop:~$ ls -ld /mnt/portsmouth/

drwxrwxrwt 2 root root 4096 2010-02-24 15:13 /mnt/portsmouth/

Important Notes

When you mount an NFS share on the client, the client thought that he is creating files on the local machine, but the truth is that the files he created all reside in the NFS server. Once you unmount the NFS share, the client files are not on his or her home directory. They are found on the NFS server.

Posted by: isaraffee | April 21, 2010

Exploring NFS in Vector Linux with Ubuntu Jaunty as Client

Exploring NFS in Vector Linux with Ubuntu Jaunty as Client

Vector Linux is configured as the NFS server

Check that the NFS package is install

root:# slapt-get –installed | grep nfs

nfs-utils-1.0.10-i486-3 [inst=yes]: nfs-utils (Network File System daemons and utilities)

root:# slapt-get –installed | grep portmap

portmap-5.0-i486-3 [inst=yes]: portmap (a daemon to manage RPC connections)

Check where to start the NFS server daemon

root:# cd /etc/rc.d

vector://etc/rc.d

root:# ./rc.nfsd

Important Notes

If you are thinking of making Vector Linux as the ssh or NFS server, you must stop the firewall service by typing:

#cd /etc/rc.d

#./rc.firewall stop

Otherwise your ssh or NFS share will not be accessible from remote hosts. I wrote a rc script which will stop the firewall services, before the server starts the NFS and SSH. Follow the steps, and I remind you that this is for Vector linux.

root:# cd /etc/rc.d

vector://etc/rc.d

root:# cd rc4.d/

vector://etc/rc.d/rc4.d

root:# ls

K49ifplugd@ S50ifplugd@ S76tembokapi* S99cups*

K76firewall@ S70firewall@ S77nfsd* S99sshd*

vector://etc/rc.d/rc4.d

The rc script is called S76tembokapi. Make sure the script name begins with letter S (means start) and that the number is after the firewall script S70FIREWALL. That’s why I chose number 76; after the firewall start and before the nfsd and sshd scripts started.

Create a directory to be shared

root:# cd /root/Desktop/

vector:/~/Desktop

root:# mkdir TopHits

vector:/~/Desktop

root:# vi somefile.txt

Write some things to the file and save.

Let’s check if the nfsd service is running on the NFS server (the Vector Linux)

root:# ps -ef|grep nfs

root 3417 3372 0 08:00 pts/3 00:00:00 grep nfs

It shows that nfs server is not running

But before we start it let’s edit the /etc/exports file

Edit the /etc/exports

Add a line that looks like this:

/root/Desktop/TopHits 172.16.0.2/255.255.0.0(rw,no_root_squash)

The IP address here is the NFS client, which is my case is the Ubuntu Jaunty.

After that run the following command to export the folders.

root:# exportfs -a -v

exportfs: /etc/exports [1]: Neither ‘subtree_check’ or ‘no_subtree_check’ specified for export “172.16.0.2/255.255.0.0:/root/Desktop/TopHits”.

Assuming default behaviour (‘subtree_check’).

NOTE: this default will change with nfs-utils version 1.1.0

exporting 172.16.0.2/255.255.0.0:/root/Desktop/TopHits

Make sure you have the /root/Desktop/TopHIts created on your ssh server, otherwise you are not sharing anything.

Now let’s restart the NFS server:

Before that we also note that for NFS to work, you need the rpc portmap and nfs service running. Now we already know how to check for nfs service. To check for the rpc portmap type:

vector://etc

root:# ps -ef|grep portmap

root 3423 3372 0 08:06 pts/3 00:00:00 grep portmap

vector://etc

root:# ps -ef|grep rpc

root 3425 3372 0 08:06 pts/3 00:00:00 grep rpc

Ok let’s start the NFS server on the Vector Linux

root:# cd /etc/rc.d

vector://etc/rc.d

root:# ./rc.nfsd start

Starting RPC portmapper: /sbin/rpc.portmap

Starting RPC kernel lockd process: /sbin/rpc.lockd

Starting RPC NSM (Network Status Monitor): /sbin/rpc.statd

Starting NFS server daemons:

/usr/sbin/exportfs -r

exportfs: /etc/exports [1]: Neither ‘subtree_check’ or ‘no_subtree_check’ specified for export “172.16.0.2/255.255.0.0:/root/Desktop/TopHits”.

Assuming default behaviour (‘subtree_check’).

NOTE: this default will change with nfs-utils version 1.1.0

/usr/sbin/rpc.rquotad

/usr/sbin/rpc.nfsd 8

/usr/sbin/rpc.mountd

Check for the necessary services:

root:# ps -ef|grep rpc

bin 3453 1 0 08:08 ? 00:00:00 /sbin/rpc.portmap

root 3462 1 0 08:08 ? 00:00:00 /sbin/rpc.statd

root 3465 1 0 08:08 ? 00:00:00 /usr/sbin/rpc.rquotad

root 3478 6 0 08:08 ? 00:00:00 [rpciod/0]

root 3479 1 0 08:08 ? 00:00:00 /usr/sbin/rpc.mountd

root 3496 1 0 08:10 ? 00:00:00 /usr/sbin/rpc.rquotad

root 3499 1 0 08:10 ? 00:00:00 /usr/sbin/rpc.mountd

root 3501 3372 0 08:10 pts/3 00:00:00 grep rpc

root:# ps -ef|grep nfs

root 3467 6 0 08:08 ? 00:00:00 [nfsd4]

root 3468 1 0 08:08 ? 00:00:00 [nfsd]

root 3469 1 0 08:08 ? 00:00:00 [nfsd]

root 3470 1 0 08:08 ? 00:00:00 [nfsd]

root 3471 1 0 08:08 ? 00:00:00 [nfsd]

root 3472 1 0 08:08 ? 00:00:00 [nfsd]

root 3473 1 0 08:08 ? 00:00:00 [nfsd]

root 3474 1 0 08:08 ? 00:00:00 [nfsd]

root 3475 1 0 08:08 ? 00:00:00 [nfsd]

root 3505 3372 0 08:11 pts/3 00:00:00 grep nfs

rpcinfo utility

The rpcinfo utility displays information about programs registered with portmap and makes RPC calls to programs to see if they are alive

Type the command:

# rpcinfo -p ubuntu.example.com

You can replace the hostname with IP address or localhost.

Use the -u option to display a list of versions of a daemon registered on a host

# rpcinfo -u ubuntu.example.com nfs

program 100003 version 2 ready and waiting

program 100003 version 3 ready and waiting

program 100003 version 4 ready and waiting

Now let’s configure the NFS client on the Ubuntu Jaunty

Firstly, make a directory at the client

# mkdir /mnt/share

Next mount the shareon the NFS client and in my case it’s Ubuntu Jaunty:

# mount -t nfs 172.16.0.1:/root/Desktop/TopHits /mnt/share

Check to see if it is mounted

root@ismail-laptop:~# mount

# mount

/dev/sda1 on / type ext3 (rw,relatime,errors=remount-ro)

tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)

proc on /proc type proc (rw,noexec,nosuid,nodev)

<lines truncated for brevity>

172.16.0.1:/root/Desktop/TopHits on /mnt/share type nfs (rw,addr=172.16.0.1)

Look at the last entry. It shows that the NFS share is mounted.

Let’s edit the file from the NFS client

# cd /mnt/share/

root@ismail-laptop:/mnt/share# ls

somefile.txt

root@ismail-laptop:/mnt/share# vi somefile.txt

hello world

hi earthlings! Greetings from mars.

You can also check that the file is updated on the NFS server

To unmount the share on the NFS client, type:

#umount /mnt/share

Note:

Based on several tests, NFS server service in Vector Linux will not start unless you have NFS share entries in your /etc/export file. If the file is blank, nfs services will not even work.

Posted by: isaraffee | April 18, 2010

Configuring Telnet Server in Ubuntu Jaunty

Configuring Telnet Server in Ubuntu Jaunty

Telnet is run as a Super Server

root@ismail-laptop:/etc/init.d# cd /etc/xinetd.d

root@ismail-laptop:/etc/xinetd.d# ls -lrt

total 24

-rw-r–r– 1 root root 727 2008-07-28 20:26 time

-rw-r–r– 1 root root 580 2008-07-28 20:26 echo

-rw-r–r– 1 root root 549 2008-07-28 20:26 discard

-rw-r–r– 1 root root 660 2008-07-28 20:26 daytime

-rw-r–r– 1 root root 798 2008-07-28 20:26 chargen

-rw-r–r– 1 root root 392 2010-02-06 03:07 telnetd

If there is no telnetd file, create one like this

service telnetd

{

disable = no

type = INTERNAL

socket_type = stream

protocol = tcp

user = root

wait = no

}

After that restart the xinetd service

root@ismail-laptop:/etc# cd init.d/

root@ismail-laptop:/etc/init.d# ./xinetd

Usage: /etc/init.d/xinetd {start|stop|reload|force-reload|restart|status}

root@ismail-laptop:/etc/init.d# ./xinetd restart

Now from Vector, telnet to Ubuntu

root:# telnet 172.16.0.2

Trying 172.16.0.2…

Connected to 172.16.0.2.

Escape character is ‘^]’.

Ubuntu 9.04

ismail-laptop login: root

Password:

Last login: Sun Feb 14 16:23:21 SGT 2010 from 172.16.0.1 on pts/2

Linux ismail-laptop 2.6.28-13-generic #45-Ubuntu SMP Tue Jun 30 19:49:51 UTC 2009 i686

root@ismail-laptop:~#

Posted by: isaraffee | April 18, 2010

FTP from Vector Linux to Ubuntu Jaunty

FTP from Vector Linux to Ubuntu Jaunty

On Ubuntu

root@ismail-laptop:~# ps -ef|grep ftp

proftpd 2930 1 0 21:05 ? 00:00:00 proftpd: (accepting connections)

root 7544 5961 0 21:48 pts/2 00:00:00 grep ftp

This shows that ftp server, proftpd is ready.

On Vector

root:# ftp 172.16.0.2

Connected to 172.16.0.2.

220 ProFTPD 1.3.1 Server (Debian) [::ffff:172.16.0.2]

Name (172.16.0.2:root): root

331 Password required for root

Password:

230 User root logged in

Remote system type is UNIX.

Using binary mode to transfer files.

ftp> ls

200 PORT command successful

Posted by: isaraffee | April 10, 2010

Setting IP address on Vector Linux

Setting IP address on Vector Linux

On Vector Linux, to edit the network interface, eth0 type:

#vi /etc/rc.d/rc.inet1

## The settings

DEVICE=’eth0′

DHCP=’no’

IPADDR=’172.16.0.1′

NETMASK=’255.255.0.0′

GATEWAY=’172.16.0.2′

PROBE=’no’

Save and quit. Then you need to restart the network services.

root:# /etc/rc.d/./rc.inet1 stop

Stopping network eth0 …

root:# /etc/rc.d/./rc.inet1 start

Ping the Vector Linux

root@ismail-laptop:~# ping 172.16.0.1

PING 172.16.0.1 (172.16.0.1) 56(84) bytes of data.

64 bytes from 172.16.0.1: icmp_seq=1 ttl=64 time=1.24 ms

64 bytes from 172.16.0.1: icmp_seq=2 ttl=64 time=0.185 ms

Older Posts »

Categories

Follow

Get every new post delivered to your Inbox.