|
[jesse@localhost
~]$ su -
Password: [root@localhost
~]#
|
|
[root@localhost
~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0F:B0:38:CF:1D inet addr:192.168.0.119 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::20f:b0ff:fe38:cf1d/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:3260 errors:0 dropped:0 overruns:0 frame:0 TX packets:3111 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2823119 (2.6 MiB) TX bytes:312244 (304.9 KiB) Interrupt:18 Base address:0xc800
|
|
[root@localhost ~]# nano /etc/hosts |
|
#
Do not remove the following line, or various programs
# that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost localhost 192.168.0.119 lintush ::1
localhost6.localdomain6 localhost6
|
|
[root@localhost ~]# hostname lintush [root@lintush ~]# service network restart |
|
[root@lintush ~]#
yum groupinstall 'Windows File Server'
|
|
[root@lintush
~]# yum install samba-doc samba-swat xinetd |
|
[root@lintush
~]# nano /etc/xinetd.d/swat
|
|
disable = yes |
|
disable
= no
|
|
[root@lintush ~]# groupadd family [root@lintush ~]# useradd -c "John Doe" -m -g family -p 123456 john |
|
[root@lintush ~]# passwd john |
|
[root@lintush
]# smbpasswd -a john
New SMB password: Retype new SMB password: Added user john. [root@lintush ]# smbpasswd -a root New SMB password: Retype new SMB password: Added
user root.
|
|
[root@lintush
]# groupadd samba-clients |
|
[root@localhost
~]# cd /srv [root@localhost srv]# mkdir samba [root@localhost srv]# cd samba [root@localhost samba]# mkdir profiles [root@localhost samba]# mkdir netlogon [root@localhost samba]# mkdir software [root@localhost samba]# mkdir games [root@localhost samba]# mkdir pictures [root@localhost samba]# mkdir movies [root@localhost samba]# mkdir music [root@localhost samba]# mkdir shared |
|
[root@lintush
samba]# chmod 1777 shared [root@lintush samba]# chmod 1777 profiles |
|
[root@lintush
samba]# gedit netlogon/family.bat.linux
|
|
echo
off
echo Setting Current Time... echo. net time \\fedora7 /set /yes echo. echo Mapping Network Drives to Samba Server... echo. net use s: \\fedora7\Software net use r: \\fedora7\Games net use p: \\fedora7\Pictures net use m: \\fedora7\Movies net use q: \\fedora7\Music net use t:
\\fedora7\Shared |
|
[root@lintush
samba]# unix2dos < netlogon/family.bat.linux >
netlogon/family.bat
|
|
[root@lintush
samba]# chmod 755 netlogon/family.bat
|
|
[root@lintush
samba]# mv /etc/samba/smb.conf /etc/samba/smb.conf.original [root@lintush samba]# nano /etc/samba/smb.conf |
[global] workgroup = linux
netbios name = fedora7
server string = Server
passdb backend = tdbsam
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
unix password sync = Yes
log level = 3
log file = /var/lib/samba/log/%U.log
max log size = 100
time server = Yes
printcap name = /etc/printcap
add user script = /usr/sbin/useradd -m %u
delete user script = /usr/sbin/userdel -r %u
add group script = /usr/sbin/groupadd %g
delete group script = /usr/sbin/groupdel %g
add user to group script = /usr/sbin/groupmod -A %u %g
delete user from group script = /usr/sbin/groupmod -R %u %g
add machine script = /usr/sbin/useradd -c 'Samba PC' -d /var/lib/nobody -g samba-clients -s /bin/false %m$
logon script = %G.bat
logon path = \\%L\Profiles\%U
logon drive = H:
logon home = \\%L\%U\.profile
domain logons = Yes
os level = 65
preferred master = Yes
domain master = Yes
admin users = root
hosts allow = 127.0.0.1, 192.168.0.0/24
hosts deny = 0.0.0.0/0
profile acls = Yes
sync always = Yes
[Profiles]
comment = User Profile Storage
path = /srv/samba/profiles
valid users = root, @family
write list = root,@family
read only = No
create mask = 0700
directory mask = 0700
browseable = No
[homes]
comment = Home Directories
valid users = %S
read only = No
create mask = 0700
directory mask = 0700
browseable = No
[netlogon]
comment = Network Logon Services
path = /srv/samba/netlogon
valid users = root, @family
write list = root
browseable = No
[printers]
comment = All Printers
path = /var/spool/samba
valid users = root, @family
create mask = 0666
guest ok = Yes
printable = Yes
browseable = No
[Software]
comment = Programs & drivers storage area
path = /srv/samba/software
valid users = root, @family
write list = root
read only = No
create mask = 0775
directory mask = 0775
[Games]
comment = Games storage area
path = /srv/samba/games
valid users = root, @family
write list = root
read only = No
create mask = 0775
directory mask = 0775
[Pictures]
comment = Photo storage area
path = /srv/samba/pictures
valid users = root, @family
read list = @family
write list = root
read only = No
create mask = 0775
directory mask = 0775
[Movies]
comment = Movie storage area
path = /srv/samba/movies
valid users = root, @family
read list = @family
write list = root
read only = No
create mask = 0775
directory mask = 0775
[Music]
comment = Music storage area
path = /srv/samba/music
valid users = root, @family
write list = root
read only = No
create mask = 0775
directory mask = 0775
[Shared]
comment = Shared area for family
path = /srv/samba/shared
valid users = root, @family
write list = root, @family
read only = No
create mask = 0755
|
|
[root@localhost
samba]# testparm /etc/samba/smb.conf
Load smb config files from /etc/samba/smb.conf Processing section "[Profiles]" Processing section "[homes]" Processing section "[netlogon]" Processing section "[printers]" Processing section "[Software]" Processing section "[Games]" Processing section "[Pictures]" Processing section "[Movies]" Processing section "[Music]" Processing section "[Shared]" Loaded services file OK. Server role: ROLE_DOMAIN_PDC Press enter to see a dump of your service definitions [global] workgroup = LINUX netbios name = FEDORA7 server string = Server passdb backend = tdbsam passwd program = /usr/bin/passwd %u passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully* unix password sync = Yes log level = 3 log file = /var/lib/samba/log/%U.log max log size = 100 time server = Yes printcap name = /etc/printcap add user script = /usr/sbin/useradd -m %u delete user script = /usr/sbin/userdel -r %u add group script = /usr/sbin/groupadd %g delete group script = /usr/sbin/groupdel %g add user to group script = /usr/sbin/groupmod -A %u %g delete user from group script = /usr/sbin/groupmod -R %u %g add machine script = /usr/sbin/useradd -c 'Samba PC' -d /var/lib/nobody -g samba-clients -s /bin/false %m$ logon script = %G.bat logon path = \\%L\Profiles\%U logon drive = H: logon home = \\%L\%U\.profile domain logons = Yes os level = 65 preferred master = Yes domain master = Yes admin users = root hosts allow = 127.0.0.1, 192.168.0.0/24 hosts deny = 0.0.0.0/0 profile acls = Yes sync always = Yes [Profiles] comment = User Profile Storage path = /srv/samba/profiles valid users = root, @family write list = root, @family read only = No create mask = 0700 directory mask = 0700 browseable = No [homes] comment = Home Directories valid users = %S read only = No create mask = 0700 directory mask = 0700 browseable = No [netlogon] comment = Network Logon Services path = /srv/samba/netlogon valid users = root, @family write list = root browseable = No [printers] comment = All Printers path = /var/spool/samba valid users = root, @family create mask = 0666 guest ok = Yes printable = Yes browseable = No [Software] comment = Programs & drivers storage area path = /srv/samba/software valid users = root, @family write list = root read only = No create mask = 0775 directory mask = 0775 [Games] comment = Games storage area path = /srv/samba/games valid users = root, @family write list = root read only = No create mask = 0775 directory mask = 0775 [Pictures] comment = Photo storage area path = /srv/samba/pictures valid users = root, @family read list = @family write list = root read only = No create mask = 0775 directory mask = 0775 [Movies] comment = Movie storage area path = /srv/samba/movies valid users = root, @family read list = @family write list = root read only = No create mask = 0775 directory mask = 0775 [Music] comment = Music storage area path = /srv/samba/music valid users = root, @family write list = root read only = No create mask = 0775 directory mask = 0775 [Shared] comment = Shared area for family path = /srv/samba/shared valid users = root, @family write list = root, @family read only = No create
mask = 0755
|
|
[root@localhost
samba]# chkconfig --level 235 smb on |
|
[root@localhost
samba]# service smb start |
|
[root@localhost
samba]# /etc/init.d/smb start |
|
[root@localhost
samba]# smbclient -L localhost -U%
Domain=[LINUX] OS=[Unix] Server=[Samba 3.0.28-0.fc8] Sharename Type Comment --------- ---- ------- Software Disk Programs & drivers storage area Games Disk Games storage area Pictures Disk Photo storage area Movies Disk Movie storage area Music Disk Music storage area Shared Disk Shared area for family IPC$ IPC IPC Service (Server) PSC_2350_series Printer HP PSC 2350 series Domain=[LINUX] OS=[Unix] Server=[Samba 3.0.28-0.fc8] Server Comment --------- ------- FEDORA7 Server Workgroup Master --------- ------- LINUX
FEDORA7
|
|
[root@localhost
samba]# smbclient -L lintush -Ujohn%123456
Domain=[LINUX] OS=[Unix] Server=[Samba 3.0.28-0.fc8] Sharename Type Comment --------- ---- ------- Software Disk Programs & drivers storage area Games Disk Games storage area Pictures Disk Photo storage area Movies Disk Movie storage area Music Disk Music storage area Shared Disk Shared area for family IPC$ IPC IPC Service (Server) PSC_2350_series Printer HP PSC 2350 series john Disk Home Directories Domain=[LINUX] OS=[Unix] Server=[Samba 3.0.28-0.fc8] Server Comment --------- ------- FEDORA7 Server Workgroup Master --------- ------- LINUX
FEDORA7
|
|
[root@localhost
samba]# smbclient //lintush/Shared -Ujohn%123456
Domain=[LINUX] OS=[Unix] Server=[Samba 3.0.28-0.fc8] smb:
\>
|
|
smb:
\> exit |
|
[root@lintush
~]# chkconfig --level 235 nmb on
|
|
[root@localhost
samba]# service nmb start |
|
[root@localhost
samba]# /etc/init.d/nmb start |

To see
the workgroup 'linux', double-click on Windows Network. You should
see something similar to the image below showing the 'linux'
workgroup. This image also shows my samba server 'fc7' which is my
file server. If you just get a blank window then you have to wait
about 15 minutes and then you will see the work-group.



|
[root@lintush
samba]# chkconfig --level 235 xinetd on |
|
[root@lintush
samba]# service xinetd start
|







NOTE: When selecting a server/domain from the Log on to: drop down box, Windows may seem to be hung up but its not. Just press Ctrl-Alt-Del and it will allow you to choose the server from the list. Select or click on linux.
