Linux - DistributionsThis forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on...
Note: An (*) indicates there is no official participation from that distribution here at LQ.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
im in the process of making a windoes file server at school, not for a class, but because we can, me and my comp teacher are doing it for one of the comp labs, anyways i was wondering which version or redhat would work best to do that with, i mean i know it wont be too big of difference, but maybe what you people perfer to run, i have access to 7.1 7.3 and 8.0 and i could download others if needed, but i was just curious!
You will need Samba. It is a server / client program capable of communicating over a network using microsoft networking.
The distro or version of the distro make no difference. You just need to get the latest stable version of Samba and install it on your system.
All of the versions of RedHat come with samba and you can get the latest rpm updates to samba from ftp.redhat.com, rpmfind.net, or samba.org. rpmfind.net will have the latest update for your specific version. I would recommend using RedHat up2date if you have internet access.
Just install RedHat and make sure you install samba and samba-swat
Setup networking if you didn't during setup...
(very short version)
If you have a dhcp server on your network run this...
dhcpcd eth0
If not decide what your file server ip address is and set it like this...
ifconfig eth0 192.168.0.1
Test it by pinging another machine on the network
ping 192.168.0.97
PING 192.168.0.97 (192.168.0.97) from 192.168.0.1 : 56(84) bytes of data.
64 bytes from 192.168.0.97: icmp_seq=2 ttl=64 time=0.137 ms
Cool!
Internet access?
Run up2date to register the machine, run up2date again and update up2date, then run up2date again and update everything else except the kernel files, then run it to update the kernel. Then reboot to use the new kernel.
If not just use what came with it.
User setup.. If you have gnome or kde installed there are windows tools for this. Here is the command line way to do it.
----------------------------------------------------------------------
Add your users and set passwords
useradd david
passwd david
smbpasswd david:david
useradd cletus
passwd cletus
smbpasswd cletus
Add some groups if you want to.
You can use them in many ways for share permissions
Many possibilities here. Depends on how you want to setup your network and how complex your shares are going to be.
examples
groupadd lanusers
groupadd teachers
groupadd students
Add users to groups
gpasswd -a david teachers
gpasswd -a david lanusers
gpasswd -a cletus lanusers
gpasswd -a cletus students
As an example you could setup shares that are accessable only by teachers, shares accessable by students and teachers, shares accessable by lanusers.
Anyone not in one of the groups could have a public share accessable by guests.
Configure Samba with swat
------------------------------------------------------------------
Backup the smb.conf file..
cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
Then enable swat using setup > system services .. turn on samba (smb) and samba-swat (swat).
You could also enable swat (it's disabled by default) by editing /etc/xinetd.d/swat ...
disabled = no
The file also has the permission to access swat at 127.0.0.1 which is the local machine. You could add ipaddresses of machines that you want to access it from.
Then you can start swat by restarting xinetd ...
/etc/rc.d/init.d/xinetd restart
Check to see if it's running if you want to with this command ...
netstat -a | grep swat
tcp 0 0 *:swat *:* LISTEN
This says swat is running, you can open a browser on a machine that you gave swat access.
On the server itself it will be ...
127.0.0.1:901
To access swat from another machine use the server ip. If it's setup using dhcp find it like this ...
If you login as another user on your file server you will not be able to setup the server, only view some stats.
Configure your server and your shares. You should not change things unless you know what they are. There are help messages for each setting. Just stick to the basics until you have it running.
This says start samba in runlevel 3,4, and 5, and stop it in the others.
If it's off you could turn it on (done earlier if you used setup) with
chkconfig --level 345 smb on
You can control samba with this ...
/etc/rc.d/init.d/smb
Usage: /etc/rc.d/init.d/smb {start|stop|restart|reload|status|condrestart}
examples
/etc/rc.d/init.d/smb start
/etc/rc.d/init.d/smb stop
You will have the backup copy of the smb.conf file if you need to start over just copy it back in the place of the one that swat changed. Once you have some success with it make another backup of the smb.conf file.
Look in the smb.conf file to see what you are actually using.
You will need to restart samba each time you change the config file for changes to take effect.
/etc/rc.d/init.d/smb restart
Or use swat to restart it.
Start using the file server
Good Luck!!
Last edited by DavidPhillips; 11-07-2002 at 12:14 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.