Tuesday, November 4, 2014

How to configure Samba in Oracle Solaris 10

In the name of Allah, Most Gracious, Most Merciful

Samba comes installed with Oracle Solaris 10. We only have to configure it according to our needs. Following are steps to properly configure samba according to our needs.

You can verify that samba packages are already installed in Oracle Solaris 10 by following command.

1. pkginfo -x | grep -i samba

SUNWsmbac    samba - A Windows SMB/CIFS fileserver for UNIX (client)
SUNWsmbar    samba - A Windows SMB/CIFS fileserver for UNIX (Root)
SUNWsmbau    samba - A Windows SMB/CIFS fileserver for UNIX (Usr)

2. You can check the location of samba config file by following command

pkgchk -l SUNWsmbar | grep conf-example

Pathname: /etc/samba/smb.conf-example

3. Check current state of samba

svcs -a | grep samba

disabled       Feb_22   svc:/network/samba:default

4. Try to enable samba

svcadm enable samba

maintenance    10:27:33 svc:/network/samba:default

It is not enabled, but it is in maintenance mode. You can check the errors encountered while enabling samba by following command.

tail /var/adm/messages

mysystem svc.startd[8]: [ID 652011 daemon.warning] svc:/network/samba:default: Method "/usr/sbin/smbd -D" failed with exit status 1

It means samba failed to start, it most likely due to missing config file.

Monday, April 8, 2013

Simple Backup Shell Script

Dears,

 I would like to share with you simple shell script that allows you to backup your files and tar.gz them.


#!/bin/bash

BACKUP_DIR=/home/oracle/file
tar -cvzf backup.tar.gz $BACKUP_DIR

Wednesday, January 2, 2013

How to Update to Oracle Solaris 11.1 Using the Image Packaging System

This article details the steps required to update your Oracle Solaris 11 11/11 systems to Oracle Solaris 11.1 using the Image Packaging System (IPS).



Published October 2012



Depending on your current environment, there are two main approaches for updating to Oracle Solaris 11.1:

Want technical articles like this one delivered to your inbox? Subscribe to the Systems Community Newsletter—only technical content for sysadmins and developers.



Through the Oracle Solaris Release Repository

Through the Oracle Solaris Support Repository (if you have an Oracle support agreement).



Most users who have installed Oracle Solaris 11 without an Oracle support agreement will be using the Oracle Solaris Release Repository as their configured package repository, as shown below using the pkg publisher command:



# pkg publisher

PUBLISHER TYPE STATUS URI

solaris origin online http://pkg.oracle.com/solaris/release/





Customers who have an Oracle support agreement will be using the Oracle Solaris Support Repository as their configured package repository, as shown below:



# pkg publisher

PUBLISHER TYPE STATUS URI

solaris origin online https://pkg.oracle.com/solaris/support



Solaris 11 – Install Gnome on Text Install

When you`ve got an old server with CD-ROM and therefore cannot install the live edition, or you have another reason to install Gnome on Solaris 11 you should follow my very short guide;




Login onto the console and use the following commands:



sudo pkg install slim_install

sudo svcadm enable gdm



And if you want to run the deskstop:

startx

Tuesday, July 24, 2012

Oracle Linux 5.7 x64 and Oracle Database 11g Release 2 (11.2.0.3) - VMWare 5.36 GB






The composition of the release include: Oracle Enterprise Linux 5.7 x64 (full free copy of RHEL 5.7), ASMLib 2.0, Oracle Database 11g Release 2 (11.2.0.3) Enterprise Edition for Linux x64, Oracle Grid Infrastructure 11g Release 2 (11.2.0.3) for Linux x64, Oracle HTTP Server 11.1.1.5 for Linux x64, Oracle Enterprise Manager - Oracle Database Administration Tool, Oracle Application Express 4.1.0 - Free development tool customized Web-based
Oracle Enterprise Linux 5.7 x64 (full free copy of RHEL 5.7)
ASMLib 2.0
Oracle Database 11g Release 2 (11.2.0.3) Enterprise Edition for Linux x64
Oracle Grid Infrastructure 11g Release 2 (11.2.0.3) for Linux x64
Oracle HTTP Server 11.1.1.5 for Linux x64
Oracle Enterprise Manager - Oracle Database Administration Tool
Oracle Application Express 4.1.0 - Free development tool customized Web-based applications from the manufacturer, full details can be found here: http://otn.oracle.com/apex
Purpose:

Saturday, June 30, 2012

Setting up rsync on Solaris 10 Sparc

Down the following packages from
http://www.sunfreeware.com/indexsparc10.html
rsync-3.0.7-sol10-sparc-local.gz
Dependencies
popt-1.14-sol10-sparc-local.gz
libiconv-1.13.1-sol10-sparc-local.gz
libgcc-3.4.6-sol10-sparc-local.gz
libintl-3.4.0-sol10-sparc-local.gz
Install the packages using
Pkgadd -d
To check the packages installed
pkginfo -l SMCliconv
pkginfo -l SMCrsync
To remove packages
pkgrm SMCrsync
once the packages are installed
Create a  rsyncd.conf  and  rsync.passwd file in /etc

Friday, June 29, 2012

Solaris 10: How to Copying Files with scp

In The Name Of Allah The Beneficent The Merciful 

The OpenSSH suite of programs is one of my favourite toolkits for administration of servers on a LAN. I routinely use the scp command to copy files between systems and move stuff around as required. In effect, it replaces the old rcp command, but it much more secure as well as more convenient to use.
To copy files between two machines, say 192.168.1.101 and 192.168.1.100, sit at 192.168.1.101 and use the following command:
scp * 192.168.1.100:

Simple as that! Assuming you are the same user id on both machines, this will copy all files in the current directory to your home directory on the destination machine, 192.168.1.100. The first thing the command will do, though, is ask you for your password on the remote system - once you supply that, then you'll see the files copied, with progress bars.
Now, if you want to copy only some files, e.g. all txt files, use a standard wildcard, like this:
scp *.txt 192.168.1.100:

Suppose you want to copy them to a destination directory other than your home directory, use:
scp *.txt 192.168.1.100:/home/username/directory

Of course, you have to have write permission on the target directory.
Suppose you want to copy files from the other machine back to the one you're on - then use this syntax:
scp 192.168.1.100:*.txt .

If you have a DNS or hosts file set up, then you can (and should) use hostnames in the command, like this:
scp mail/* mailsrvr:/home/joe/mail

This will copy the contents of the mail subdirectory (of the current directory) on this machine, to the directory /home/joe/mail on the machine mailsrvr.
How Does It Work?
In general, the syntax for scp (as for cp) is:
scp [option...] source destination

where source and destination can each take the form:
[hostname:][dir-path][filespec]

or

[ip-addr:][dir-path][filespec]

The [ ] indicates something is optional. The big difference from the cp command is the use of a hostname or IP address on either the source, destination or (unusually) both. Notice that the hostname or IP address must be followed by a colon; a common mistake (I do it all the time) is to type something like:

scp fubar.zot 192.168.1.100