Thursday, August 21, 2008

Adding swap file to linux

there are three steps to add a new swap file to a linux box.
1- you have to create the swap file
dd if=/dev/zero of=swapfile bs=1024 count=1536000
2- run this command to identify the file as a swap file
mkswap /swapfile/swapfile
3- and activate it:
swapon /swapfile/swapfile

Tuesday, August 12, 2008

Property 'name' of instance .. missing errors

if you have system errors on Solaris like "Property 'name' of instance svc:/network/ftp:default is missing, inconsistent or invalid" or "Invalid configuration for instance svc:/network/finger:default, placing in maintenance" after creating a zone, you should control the /etc/services file.

You can copy this file from a working system and reboot your server. After this operation, your system will be fine.

Tuesday, June 3, 2008

Creating secure ftp account on Solaris

i told about ftpaccess file and setting a secure ftp account on solaris before. but i noticed that with that configuration i couldn't use "ls -l" (detailed list) because of security.

i found the solution, there is a command named "ftpconfig" on solaris. here is the usage:
# ftpconfig ftp_user_path

For example:

root@Uranus # ftpconfig /export/ftp2/
Updating user ftp
Updating directory /export/ftp2/

that's all..

Wednesday, May 28, 2008

Sun xVM Virtual Box

(from sun's site:)
This week Sun formally launches xVM VirtualBox, new open source virtualization software for personal computers that lets developers easily work on cross-platform applications and virtualized server environments, from any platform they choose. Power users who require multiple platforms to do their work will also benefit from xVM VirtualBox.

How is xVM VirtualBox Different?

The biggest difference between xVM and its competitors is that it is a free and open source product that requires no registration or license keys and downloads and installs quickly. In addition, xVM VirtualBox can be run on a larger number of host operating systems, including Microsoft Windows, Linux, Sun Solaris, and Apple Macintosh, than any other virtual desktop product.

http://www.sun.com/featured-articles/2008-0527/feature/index.jsp?intcmp=hp2008may27_xvm_read

Friday, May 23, 2008

how to move a zone on solaris

If you want to move a zone to another disk or partition, you can use the "move" option of zoneadm command.

first, you have to halt the zone.

# zoneadm -z zonename halt

now you can move it;

# zoneadm -z zonename move /new/partition/directory


http://docs.sun.com/app/docs/doc/819-2450/gcgnc?a=view

Friday, April 18, 2008

Creating a zone on Solaris 10

here are the basic steps to create a zone on solaris 10.

root@Uranus # zonecfg -z test1
test1: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:test1> create
zonecfg:test1> set zonepath=/space/zone/test1
zonecfg:test1> add net
zonecfg:test1:net> set physical=bge1
zonecfg:test1:net> set address=192.168.0.237
zonecfg:test1:net> end
zonecfg:test1> verify
zonecfg:test1> commit
zonecfg:test1> exit

root@Uranus # zoneadm -z test1 install

root@Uranus # zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / native shared
- test1 installed /space/zone/test1 native shared

root@Uranus # zoneadm -z test1 boot

root@Uranus # zlogin -C test1

Monday, March 31, 2008

Making Solaris ftp more secure

if you create an ftp user on a solaris system, the user can change directory to anywhere and read the list of objects in it with default configurations.

if you want to make ftp more secure you can use ftpaccess file in /etc/ftpd/ directory.

here are the steps:

- create a group for ftp
shell > groupadd ftpuser

- create a user for ftp
shell > useradd -g ftpuser -d /path/to/ftphome -s /bin/true ftpusername
note: there should be an entry in /etc/shells like "/bin/true", if not you cannot login to ftp server.

- edit /etc/ftpd/fptaccess file and add a line
guestgroup ftpuser

- then restart the ftp server
shell> svcadm restart svc:/network/ftp:default