The best definition I found for Samba goes this way "Samba is an important component to seamlessly integrate Linux/Unix Servers and Desktops into Active Directory environments using the winbind daemon".In simple words, Samba is the standard Windows interoperability suite of programs for Linux and Unix.Since long back in 1992, Samba has provided secure, stable and fast file and print services for all clients using the SMB/CIFS protocol, such as all versions of DOS and Windows, OS/2, Linux and many others.
Today we are going to setup a simple samba share.
Setting Up a Simple Samba Share which can be accessed by anyone who has account on the Machine.
Backup the smb.conf file
------------------------------------------
Locating the Correct Samba configuration File:
[root@rhel samba]# smbd -b | grep smb.conf
CONFIGFILE: /etc/samba/smb.conf
[root@rhel samba]#
[root@rhel ~]# cd /etc/samba/
[root@rhel samba]# cp smb.conf smb.conf.orig
[root@rhel samba]# > smb.conf
[root@rhel samba]# vi smb.conf
Add a simple Homes Share in smb.conf
------------------------------------------------------
[root@rhel samba]# cat smb.conf
[global]
workgroup = MIDEARTH
[homes]
guest ok = no
read only = no
[root@rhel samba]#
[root@rhel samba]# service smb restart
Shutting down SMB services: [FAILED]
Shutting down NMB services: [FAILED]
Starting SMB services: [ OK ]
Starting NMB services: [ OK ]
[root@rhel samba]#
Add a user called Jen
-----------------------------
[root@rhel samba]# useradd jen
[root@rhel samba]# passwd jen
Changing password for user jen.
New UNIX password:
BAD PASSWORD: it is WAY too short
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
Provide him with smb credentials(this is different from normal user/pass credentials)
[root@rhel samba]# smbpasswd -a jen
New SMB password:
Retype new SMB password:
Added user jen.
[root@rhel samba]#
Go to Start > Run > \\MachineIP
Login in through user/pass
Successfull !!!
You can see home directory [homes] and jen own home directory
Testing Your Samba Share
-------------------------
[root@rhel samba]# testparm /etc/samba/smb.conf
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
[global]
workgroup = MIDEARTH
[homes]
read only = No
[root@rhel samba]#
List Shares Available on the Server
-----------------------------------------------
[root@rhel samba]# smbclient -L rhel -U jen
Password:
Domain=[rhel] OS=[Unix] Server=[Samba 3.0.25b-0.4E.6]
Sharename Type Comment
--------- ---- -------
homes Disk
IPC$ IPC IPC Service (Samba 3.0.25b-0.4E.6)
jen Disk Home directory of jen
Domain=[rhel] OS=[Unix] Server=[Samba 3.0.25b-0.4E.6]
Server Comment
--------- -------
Workgroup Master
--------- -------
MIDEARTH BL07DL380G5
Done. Your first samba share is Ready !!!
Showing posts with label System Admin. Show all posts
Showing posts with label System Admin. Show all posts
1.06.2011
Setting up a Simple Samba Share - Part I
12.31.2010
Installing Apache with SSL Support
1. Download Apache from the URL http://www.apache.org/ as per project requirement
2. Extract the Downloaded tar to some temporary folder.
3. Change directory to extracted directory
4. Run the command:
[root@web /]#./configure --prefix=/opt/ --enable-so --enable-proxy --enable-ssl --enable-setenvif --enable-modules=all
[root@web /]# make
[root@web /]# make install
5. Add the lines in /opt/apache2/conf/httpd.conf file to configure virtual hosts.
6. Here two virtual hosts are configured, one is on port 80 and another on port 81.
ServerName webbuild
ProxyPass / http://webbuild:8080/
ProxyPreserveHost on
ServerName webbuild
ProxyPass / http://webbuild:8080/
ProxyPreserveHost on
7. Start the apache web server
[root@web /]# /opt/apache2/bin/apachectl start
8. To stop the apache web server use the command below.
[root@web /]# /opt/apache2/bin/apachectl stop
3 Configuration Changes for SSL to work
1. Edit ‘httpd.conf’ file to include the ‘httpd-ssl.conf’ file.
Include conf/extra/httpd-ssl.conf
2. In ‘httpd-ssl.conf’ file uncomment and edit the path for the ‘SSL Certificate’ file and ‘SSL Certificate Key’ file.
SSLCertificateFile "/opt/apachewithssl/conf/ssl.crt/ssl.crt"
SSLCertificateKeyFile "/opt/apachewithssl/conf/ssl.key/ssl.key"
3. Check the SSL Implementation by pointing the web browser to https://
2. Extract the Downloaded tar to some temporary folder.
3. Change directory to extracted directory
4. Run the command:
[root@web /]#./configure --prefix=/opt/
[root@web /]# make
[root@web /]# make install
5. Add the lines in /opt/apache2/conf/httpd.conf file to configure virtual hosts.
6. Here two virtual hosts are configured, one is on port 80 and another on port 81.
ServerName webbuild
ProxyPass / http://webbuild:8080/
ProxyPreserveHost on
ServerName webbuild
ProxyPass / http://webbuild:8080/
ProxyPreserveHost on
7. Start the apache web server
[root@web /]# /opt/apache2/bin/apachectl start
8. To stop the apache web server use the command below.
[root@web /]# /opt/apache2/bin/apachectl stop
3 Configuration Changes for SSL to work
1. Edit ‘httpd.conf’ file to include the ‘httpd-ssl.conf’ file.
Include conf/extra/httpd-ssl.conf
2. In ‘httpd-ssl.conf’ file uncomment and edit the path for the ‘SSL Certificate’ file and ‘SSL Certificate Key’ file.
SSLCertificateFile "/opt/apachewithssl/conf/ssl.crt/ssl.crt"
SSLCertificateKeyFile "/opt/apachewithssl/conf/ssl.key/ssl.key"
3. Check the SSL Implementation by pointing the web browser to https://
12.26.2010
rpm2cpio - How to List files under RPM?
rpm2cpio, as its name suggest, takes an RPM package file and convert it into cpio archive. The cpio is a binary file archiver and is a stream of files and directories in a single archive.
rpm2cpio takes only only one argument. The interesting part is its optional.
It is the name of the package file to be converted. Under no filename specified o n the command line, rpm2cpio will simply read from standard input and convert that to a cpio archive.
Let's download the subversion RPM (as an example) and see how rpm2cpio can be used to display the files.
rpm2cpio takes only only one argument. The interesting part is its optional.
It is the name of the package file to be converted. Under no filename specified o n the command line, rpm2cpio will simply read from standard input and convert that to a cpio archive.
Let's download the subversion RPM (as an example) and see how rpm2cpio can be used to display the files.
Labels:
Installation,
Linux,
LinuxNewbie,
RPM,
System Admin
How to extend LVM partition online?
Logical Volume Management ( LVM) is a disk management utility which comes by default with Linux system nowadays. It is always recommended to use LVM as it is useful whenever disk space is needed to be extended without any interruption.
Though it extends the space but one must be careful while extending the partition of the production servers where numbers of sophisticated applications are running.A Utility ext2online helps in extending the LVM space without any disruption.Let us look at this utility in little details.
Say, we created our logical volumes alpha (40GB), beta (5GB), and gamma (1GB) in the volume group emission.
Say, if you want to extend the size of gamma from 1GB to 2GB, we need to follow the following steps:
ajeet:~#lvextend -L+1024M /dev/emission/gamma
Extending logical volume media to 2 GB
Logical volume media successfully resized
ajeet:~#ext2online -d /dev/emission/gamma
The ext2online is useful as it extends the LVM partition without disturbing the overall process ongoing on the linux machine related to the particular partition.
Though it extends the space but one must be careful while extending the partition of the production servers where numbers of sophisticated applications are running.A Utility ext2online helps in extending the LVM space without any disruption.Let us look at this utility in little details.
Say, we created our logical volumes alpha (40GB), beta (5GB), and gamma (1GB) in the volume group emission.
Say, if you want to extend the size of gamma from 1GB to 2GB, we need to follow the following steps:
ajeet:~#lvextend -L+1024M /dev/emission/gamma
Extending logical volume media to 2 GB
Logical volume media successfully resized
ajeet:~#ext2online -d /dev/emission/gamma
The ext2online is useful as it extends the LVM partition without disturbing the overall process ongoing on the linux machine related to the particular partition.
How to install Nginx through source?
In our last session, we installed Nginx through yum utility which was very easy method. But generally it is recommended to install Nginx through source as it can becomes easy to tweak as per the project requirement. Installing Nginx through source tends to provide the user to dig deep into the server and customize it as per its hardware compatibility and resource management.
Let's compile the source from scratch and how really it goes.
Create a directory called "server" under /root. Download the nginx tar from http://sysoev.ru/nginx and untar it as shown:
Lets start compiling the source now.
If you encountered this error, then follow these steps:
#yum install libpcre3 libpcre3-dev libpcrecpp0 libssl-dev zlib1g-dev
Start to compile it once again
$sudo make clean
$sudo ./configure --with-http_ssl_module
$sudo make
$sudo make install
Here it goes your Nginx server is ready.
Let's compile the source from scratch and how really it goes.
Create a directory called "server" under /root. Download the nginx tar from http://sysoev.ru/nginx and untar it as shown:
Lets start compiling the source now.
If you encountered this error, then follow these steps:
#yum install libpcre3 libpcre3-dev libpcrecpp0 libssl-dev zlib1g-dev
Start to compile it once again
$sudo make clean
$sudo ./configure --with-http_ssl_module
$sudo make
$sudo make install
Here it goes your Nginx server is ready.
Labels:
Installation,
Nginx,
System Admin,
Troubleshooting,
Web Server
12.22.2010
389-DS Installation through Kickstart on Linux
389-DS ( earlier known to be Fedora DS) is a directory server owned by Red Hat Inc. After purchasing from Netscape, Redhat promised to make it open source and hence today its popular and hold all those features which Microsoft Active Directory Server holds on its way.
This is a minimal Installation with just first CD of CentOS 5.4 and it went fine. Minimally it will install Linux OS with just < 700 MB.Though I tried it shrinking to 400 MB but I had a new venture to make 389-DS Ready.
Here is what I finished up with:
Setting up Fedora DS with just kickstart file:
Dont forget to include 389-ds.inf file (just copy paste for newer 389-DS Version).I am sure..it gonna work.
Here you go.
Now you have a complete CentOS 5.4 with Fedora DS Installed.
This is a minimal Installation with just first CD of CentOS 5.4 and it went fine. Minimally it will install Linux OS with just < 700 MB.Though I tried it shrinking to 400 MB but I had a new venture to make 389-DS Ready.
Here is what I finished up with:
Setting up Fedora DS with just kickstart file:
Dont forget to include 389-ds.inf file (just copy paste for newer 389-DS Version).I am sure..it gonna work.
Here you go.
Now you have a complete CentOS 5.4 with Fedora DS Installed.
Labels:
389-ds,
Fedora DS,
Installation,
System Admin
12.06.2010
How to Install Virtualbox 3.2.1 on Fedora 14?
Virtualbox is a powerful x86 and x86_64 virtualization product both for corporates enterprise and home users.I am a LFY subscriber and generally try out Open Source distributions which comes with the Linux For You Magazine every month. This month I decided to give Fedora 14 Final Release a try.I downloaded a 675MB Fedora 14 from http://download.fedoraproject.org/pub/fedora/linux/releases/14/Live/i686/Fedora-14-i686-Live-Desktop.iso and installed it without any issue.As I keep testing the upcoming linux distributions I do need a virtualbox on top of my Fedora box.
Finally, I decided to install Virtualbox and this is how I made it happen:
I followed these steps to finally have my Virtualbox running on Fedora:
1. Install gcc and dkms modules on Fedora 14 through yum utility:
Even after installing gcc and dkms packages if Fedora 14 throws errors like shown below, it means you are missing kernel-* packages.
Just use yum utility to install rest of kernel-* packages.If no issue occur, kindly proceed to Step 2.
2. Download Virtualbox 3.2.1 from http://www.virtualbox.org/wiki/Linux_Downloads by selecting the right package as per your architecture. In my case, I am choosing x86 arch.
3. After successful download, Click on System > Oracle VM Virtualbox. This will open the following screen:
4.Follow up the further steps as per your resources available.
5. Insert the Fedora 14 CD/DVD after right-click on VM > Settings > IDE-CDROM and this way the installation starts.Once the installation completes, Click on Start and your OS is ready to play with.
Finally, I decided to install Virtualbox and this is how I made it happen:
I followed these steps to finally have my Virtualbox running on Fedora:
1. Install gcc and dkms modules on Fedora 14 through yum utility:
Even after installing gcc and dkms packages if Fedora 14 throws errors like shown below, it means you are missing kernel-* packages.
Just use yum utility to install rest of kernel-* packages.If no issue occur, kindly proceed to Step 2.
2. Download Virtualbox 3.2.1 from http://www.virtualbox.org/wiki/Linux_Downloads by selecting the right package as per your architecture. In my case, I am choosing x86 arch.
3. After successful download, Click on System > Oracle VM Virtualbox. This will open the following screen:
4.Follow up the further steps as per your resources available.
5. Insert the Fedora 14 CD/DVD after right-click on VM > Settings > IDE-CDROM and this way the installation starts.Once the installation completes, Click on Start and your OS is ready to play with.
Subscribe to:
Posts (Atom)























