Touch with us for Information Technology Solutions. Email us for your Query on Technical.gaurav@gmail.com.
Propellerads
Showing posts with label Redhat. Show all posts
Showing posts with label Redhat. Show all posts

11/03/2014

Step-by-step samba server configuration on RedHat Enterprise Linux

Step-by-step samba server configuration on Red Hat Enterprise Linux

1.Server  IP address is 192.168.0.254 and machine name is SERVER1.
2.Windows machine IP address is 192.168.0.2 and machine name is client2.
3.Firewall Should be disabled.
 #chkconfig iptables off
 #service iptables stop
 #chkconfig ip6tables off
 #service ip6tables  stop
4.To check if all rpms required for samba are installed or not.
 #rpm –qa | grep samba
 Samba-<version-name>
 Samba-common-<version-name>
 Samba-client-<version- name>
 System-config-samba-<version-name>
5.If not, install it using
 #rpm –ivh samba
6.Copy the original configuration file as smb.conf.bck
 #cp /etc/samba/smb.conf /etc/samba.conf.bck
 (This will keep a backup copy of your configuration file.)
7.Now edit the configuration file
 #vi /etc/samba/smb.conf
8.To share home directory edit this part of /etc/samba/smb.conf
 [homes]
 comment=Home directories
 browseable =no
 writable=yes
9.To share printer edit this part of  /etc/samba/smb.conf
 [printers]
 comment = All printers
 path = /var/spool/samba
 browseable = no
10.To configure share called IHNCSHARE edit this part of /etc/samba/smb.conf
 [IHNC’s share]
 comment = Testing Samba Server
 path  = /samba
 valid users = user1, user2
11.Save the file with wq:
12.To check your configuration file type testparm
 #testparm
13.Create two samba users user1 and user2
 useradd user1
 useradd user2
14.Create smbpassword for both the users
 smbpasswd –a user1
 smbpasswd –a user2
15.Now you stop/start the samba services
 #service smb stop
 #service smb start
16.To see what is shared from your server through samba for a particular user
 #smbclient  -L server1 –U user1  or smbclient –L //192.168.0.1 –U user1
17.To see what is shared for a particular host
 #smbclient –L  mac2
18.Now, permanently make samba server on
 #chkconfig smb on

Accessing Windows Shares from RHEL 6

Now that the Samba resources are configured and the services are running, it is time to access the shared resource from a Windows system. On a suitable Windows system on the same workgroup as the RHEL 6 system, open Windows Explorer and navigate to the Network page. At this point, explorer should search the network and list any systems using the SMB protocol that it finds. The following figure illustrates an RHEL 6 system named rhel6 located using Windows Explorer on a Windows system 

Accessing an RHEL 6 system from a Windows 7 desktop

Double clicking on the RHEL 6 host will prompt for the name and password of a user with access privileges. In this case it is the demo account that we configured using the smbpasswd tool. Entering the username and password will result in the shared resources configured for that user appearing the explorer window, including the tmp resource previously configured:

RHEL 6 shares listed on Windows 7

Double clicking on the tmp shred resource will display a listing of the files and directories contained therein.

Accessing Windows Shares from RHEL 6

As previously mentioned, Samba is a two way street, allowing not only Windows systems to access files and printers hosted on an RHEL 6 system, but also allowing the RHEL system to access shared resources on Windows systems. This is achieved using the samba-client package which is installed by default under most RHEL 6 configurations. If it is not currently installed, install it from a Terminal window as follows:
su –
yum install samba-client 
To access any shared resources on a Windows system, begin by selecting the Places -> Network desktop menu option. This will display the Network browser dialog including an icon for theWindows Network (if one is detected) as illustrated in the following figure:

Image:rhel6_windows_network_in_nautilus.jpg

To obtain a list of Windows workgroups on the network, double click on the Windows Network icon. From within the list of workgroups double click on the desired group to obtain a listing of servers available for access:
Image:rhel6_samba_windows_resources.jpg
Finally, double clicking on a computer will list the shared resources available for access from the RHEL client.

Summary

In this chapter we have looked at the steps necessary to configure an RHEL 6 system to act as both a Samba client and server allowing the sharing of resources with other systems on a Windows based network. In the case of Samba server configuration in particular we have only scratched the surface of the configuration options available. A full over of Samba would require an entire book. Many such publications and online resources are available if you would like to learn more. Another good place to start is to type man samba in a terminal window.

04/10/2012


Red Hat 6 RHEL 6 Installation

1: Select Install or upgrade an existing system option on Grub Menu

1. Select Install or upgrade an existing system option on Grub Menu
2: Chose a Language 


2. Choose a language


3: Chose a keyboard type

3. Choose a keyboard type

4: Choose a installation media 

4. Choose a installation media

5: Skip DVD media test ( or select media test , if you want to test installation before installation )

5. Skip DVD media test (or select media test, if you want to test installation media before installation)

6: Red Hat 6 graphical installer starts, select next 

6. Red Hat 6 graphical installer starts, select next
7: Accept Pre-release Installation 


7. Accepct Pre-Release Installation

8: Select storage devices

8. Select storage devices

9: Insert computer name .

9. Insert computer name

10: Select Time Zone 

10. Select time zone

11: Enter a Password for root user 

11. Enter a password for root user

12: Select type of installation 
Read every options info carefully. And select encrypting if needed and option to review and modify partition layout.

12. Select type of installation

13: Review partition layout 
Modify if needed. Default setup with ext4 and LVM looks good for desktop machine.

13. Review partition layout and modify if needed


14: Accept write changes to disc

14. Accept write changes to disc


15: Writing changes ( creating partitions) to disc

15. Writing changes (creating partitions) to disc
16: Configure boot loader options

16. Configure boot loader options
17: Select software to install and enable repositories .

17. Select softwares to install and enable repositories
18: Customize packge selection 

18. Customize package selection - Select PHP and Web Server to installation
 Select Data base for SQL if you want 

18. Customize package selection - Select MySQL and PostgreSQL Databases
Select set of development tools like Eclipse IDE
18. Customize package selection - Select set of Development tools like Eclipse IDE
19: Checking dependencies for installation
19. Checking dependencies for installation
20: Starting installation process
20. Starting installation process
21: Installing packages 
21. Installing packages 1
21. Installing packages 2
22: Installation complete 
22. Installation is complete - Click reboot computer and remove installation media
RED HAT 6 RHEL Finished 

23: Select RHEL 6 from grub 

23. Selecting RHEL 6 from grub
24: Booting Red Hat 6

24. Booting Red Hat 6
25: Red Hat 6 Welcome Screen

25. Red Hat 6 Welcome screen
26: Create normal user 
26. Create normal user
27: Setup date and time and kep up-to-date with NTP 

27. Setup date and time
27. Setup date and time and keep up-to-date with NTP
28: Login RedHat 6 Gnome Desktop 

28. Login Red Hat 6 Gnome Desktop
29: Red Hat ( RHEL) 6 Gnome Desktop , empty and default look

29. Red Hat (RHEL) 6 Gnome Desktop, empty and default look

01/10/2012

Vim Installation & Commands

Basics VIM ( VI-EDITOR) Feature's :-

The vi Editor had three modes Command mode , Insert mode & Command line mode .
  • Command mode :- Commands are case sensitive . The ESC key can end a command .
  • Text is inserted   :-The ESC key ends insert mode and returns you to command mode. One can enter insert mode with the "i" (insert), "a" (insert after), "A" (insert at end of line), "o" (open new line after current line) or "O" (Open line above current line) commands.
  • Command line mode :- One enters this mode by typing ":" which puts the command line entry at the foot of the screen.


Partial list of interactive commands:

KeystrokesAction
h/j/k/lMove cursor left/down/up/right
spacebarMove cursor right one space
-/+Move cursor down/up in first column
ctrl-dScroll down one half of a page
ctrl-uScroll up one half of a page
ctrl-fScroll forward one page
ctrl-bScroll back one page
M (shift-h)Move cursor to middle of page
HMove cursor to top of page
LMove cursor to bottom of page
W
w
5w
Move cursor a word at a time
Move cursor ahead 5 words
B
b
5b
Move cursor back a word at a time
Move cursor back a word at a time
Move cursor back 5 words
e
5e
Move cursor to end of word
Move cursor ahead to the end of the 5th word
0 (zero)Move cursor to beginning of line
$Move cursor to end of line
)Move cursor to beginning of next sentence
(Move cursor to beginning of current sentence
GMove cursor to end of file
%Move cursor to the matching bracket.
Place cursor on {}[]() and type "%".
Use the matchit or xmledit plug-in to extend this capability to XML/XHTML tags.
'.Move cursor to previously modified line.
'aMove cursor to line mark "a" generated by marking with keystroke "ma"
'AMove cursor to line mark "a" (global between buffers) generated by marking with keystroke "mA"
]'Move cursor to next lower case mark.
['Move cursor to previous lower case mark.

Editing Commands:

KeystrokesAction
iInsert at cursor
aAppend after cursor
AAppend at end of line
ESCTerminate insert mode
uUndo last change
UUndo all changes to entire line
oOpen a new line
dd
3dd
Delete line
Delete 3 lines.
DDelete contents of line after cursor
CDelete contents of line after cursor and insert new text. Press esc key to end insertion.
dw
4dw
Delete word
Delete 4 words
cwChange word
xDelete character at cursor
rReplace character
ROverwrite characters from cursor onward
sSubstitute one character under cursor continue to insert
SSubstitute entire line and begin to insert at beginning of line
~Change case of individual character
ctrl-a
ctrl-x
Increment number under the cursor.
Decrement number under the cursor.
/search_string{CR}Search for search_string
?search_string{CR}Search backwards (up in file) for search_string
/\<search_string\>{CR}Search for search_word
Ex: /\<s\>
Search for variable "s" but ignore declaration "string" or words containing "s". This will find "string s;", "s = fn(x);", "x = fn(s);", etc
nFind next occurrence of search_word
NFind previous occurrence of search_word
.repeat last command action.

Terminate session:

Use Command :- ZZ 
Save changes and quit.

Use command line: ":wq"
Save (write) changes and quit.

Use command line: ":w"
Save (write) changes without quitting.

Use command line: ":q!"
Ignore changes and quit. 
No changes from last write will be saved.

Use command line: ":qa"
Quit all files opened.


Red Hat Enterprises 6 Linux Menu


  1. OS Installation. 
  2. Basics.
  3. How to install samba in Red Hat 6
  4. Virtualization.
  5. Security's
  6. Trouble Shooting.