Linux « Yum - add repository & fastest mirror | HOME | User & Group »
(Cent OS 4.4)
Install
# yum -y install samba
# yum -y install samba-swat
# nano /etc/xinetd.d/swat
{
port = 901
socket_type = stream
wait = no
only_from = 127.0.0.1 (if necessary)
only_from = 10.81.255.0 (if necessary)
user = root
server = /usr/sbin/swat
log_on_failure += USERID
disable = no
}
# /etc/rc.d/init.d/xinetd restart
# /etc/rc.d/init.d/smb start
# chkconfig smb on
Then, access to http://server_address:901/ with user 'root'.
Now you can setup samba on GUI interface.
(Make sure httpd is running. Also if externall HDD is the space for samba, HDD has to be formatted as ext3. Otherwise you can not change any permissions against HDD from Linux because HDD has been initially formatted as FAT32.)
Setup
# nano /etc/samba/smb.conf
[global] (Add below)
dos charset = CP932
unix charset = UTF-8
display charset = UTF-8
hosts allow = 192.168.1. 192.168.2. 127. (if necessary)
[public] (Create directory like this.)
comment = Read only Directories
path = /home/samba/public
read only = No
valid users = root (if necessary)
create mask = 0777
directory mask = 0777
And setup on SWAT.
Create directory
# mkdir -p /home/samba_home
# chown -R nobody. /home/samba_home
Add samba user
# groupadd samba_user (add group for samba user)
# useradd -s /sbin/nologin -g samba_user username (no shell)
# passwd username
# pdbedit -a username (Even if you have an account in Linux already, you need to create a samba account with this command again.)

