Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

The Windows Administrator's 10-Minute Guide to Installing Red Hat Linux : Page 6

Linux has become increasingly attractive, not only as a low-cost platform for hosting Web servers, but also as a target for desktop development efforts. If you would like to run Linux, but you're only familiar with Windows, you can follow this step-by-step guide to get Red Hat Linux installed and configured on a machine running Windows.


advertisement
Connecting Linux to Windows
Before you can complete this next step, you need to know the IP addresses your LAN uses to connect to the server. You need these IP addresses to make the "Windows File Server" accessible through the firewall that you installed earlier. To allow your Windows network to access files on the Linux system, enter the lines below using the command "iptables", substituting your network's IP addresses for the ones shown in our example (we used 192.168.1.0/255.255.255.0 as our source network).

Editor's Note: The commands below were wrapped to fit on this page, but you should enter them on a single line.

iptables -I RH-Lokkit-0-50-INPUT -s 192.168.1.0/255.255.255.0 -p udp --dport 137:138 -j ACCEPT iptables --I RH-Lokkit-0-50-INPUT -s 192.168.1.0/255.255.255.0 -p tcp --dport 139 -j ACCEPT iptables-save > /etc/sysconfig/iptables

Windows File Server (Samba) Installation and Security Configuration
To get the "Windows File Server" running on the Linux box, begin by opening the /etc/samba/smb.conf file. To do that, use the "vi" command. From the command line type:

vi /etc/samba/smb.conf

Even though it's best that you configure this file on your own, here's an example to help you get started (don't forget to save your changes):



[global] workgroup = Mydomain server string = RedHat Linux Server security = user encrypt passwords = yes smb passwd file = /etc/samba/smbpasswd socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 [homes] comment = Home Directories browsable = no writable = yes valid users = %S create mode = 0664 directory mode = 0775 [webroot] comment = Webserver root path = /www/htdocs writable = yes valid users = admin create mode = 0664 directory mode = 0775

To use the example above, you must create the directory /www/htdocs. Use the command "mkdir". From the command line type:

mkdir -p /www/htdocs

You must also have a user named "admin" to add to the samba user database. You add users using the "smbadduser" command. For the "admin" user, the correct syntax to use is:

smbadduser admin:admin

When you enter that command, the computer will ask you to set the admin user's password. This login/password is independent of any password you use on your Microsoft network, in other words, you don't need to use the same passwords for both platforms (in fact, we recommend that you use different passwords for added security).

To give a user permission to use Samba and have their own home directory (homedir) on the server, enter the following commands in succession:

# add a user to the system adduser -g users <username> # set a password for the user passwd <username> # adds a user to the Samba database smbadduser <username>:<username> # change a user's password in Samba: smbpasswd <username>

Note: The number signs (#) in the preceding code denote comments, and are not part of the command syntax.

The next step in the Samba configuration is to get the appropriate services running on the server. To make Samba start automatically from system startup, use the following commands as the root user:

# Add the samba application to the system startup. ln -s /etc/init.d/smb /etc/rc.d/rc3.d/S98smb # Restart the samba application /etc/init.d/smb restart

You can now browse to your Linux server from your Windows computer through the Network Browser by entering the IP address to the Linux server, for example: \\<ipaddress to Linux server>\



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date