[phpBB Debug] PHP Notice: in file /includes/db/dbal.php on line 110: Undefined array key "cached"
[phpBB Debug] PHP Notice: in file /includes/db/dbal.php on line 111: Undefined array key "normal"
[phpBB Debug] PHP Notice: in file /includes/db/dbal.php on line 112: Undefined array key "total"
[phpBB Debug] PHP Notice: in file /includes/session.php on line 885: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 885: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 885: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3391: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3393: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3394: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3395: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
Cabrillo College Linux Classes • View topic - File Sharing /w Windows - SAMBA

File Sharing /w Windows - SAMBA

UNIX/Linux System Administration

File Sharing /w Windows - SAMBA

Postby keivn dodd on Thu Dec 11, 2008 4:28 am

The Samba package is included with most distros and provides file and printer sharing services to windows clients.

Config Files
/etc/samba/smb.conf

Binary Files
/usr/bin/smbclient -L hostname - Lists the shares on the host
/usr/bin/smbpasswd -a user - Sets the smb password for the user account
/usr/bin/smbcontrol
/usr/bin/smbstatus

The text book covers it on page 829-835
Here is a good example of some of the available options available
http://us6.samba.org/samba/docs/man/Sam ... ollection/
http://www.comptechdoc.org/os/linux/man ... bconf.html
Last edited by keivn dodd on Fri Dec 12, 2008 8:20 am, edited 2 times in total.
keivn dodd
 
Posts: 43
Joined: Sat Sep 13, 2008 2:30 am

The Samba Web Administration Tool - SWAT

Postby keivn dodd on Thu Dec 11, 2008 8:18 am

The Samba Web Administration Tool - SWAT
http://localhost:901

Files
/usr/sbin/swat
/usr/share/samba/swat

To start swat add to /etc/xinetd.conf
# default: off
# description: SWAT is the Samba Web Admin Tool. Use swat \
# to configure your Samba server. To use SWAT, \
# connect to port 901 with your favorite web browser.
service swat
{
port = 901
socket_type = stream
wait = no
only_from = localhost
user = root
server = /usr/sbin/swat
log_on_failure += USERID
disable = no
}
keivn dodd
 
Posts: 43
Joined: Sat Sep 13, 2008 2:30 am

xinetd

Postby keivn dodd on Thu Dec 11, 2008 4:30 pm

xinetd starts server deamons on demand. It's used to start the SWAT interface deamon.
It replaces the depreciated initrd.
Pages 887 - 893 of the text book. http://www.xinetd.org/faq.html

Its configuration file is /etc/xinetd.conf
#
# xinetd.conf
#
# Copyright (c) 1998-2001 SuSE GmbH Nuernberg, Germany.
# Copyright (c) 2002 SuSE Linux AG, Nuernberg, Germany.
#

defaults
{
log_type = FILE /var/log/xinetd.log
log_on_success = HOST EXIT DURATION
log_on_failure = HOST ATTEMPT
# only_from = localhost
instances = 30
cps = 50 10

#
# The specification of an interface is interesting, if we are on a firewall.
# For example, if you only want to provide services from an internal
# network interface, you may specify your internal interfaces IP-Address.
#
# interface = 127.0.0.1

}
# default: off
# description: SWAT is the Samba Web Admin Tool. Use swat \
# to configure your Samba server. To use SWAT, \
# connect to port 901 with your favorite web browser.
service swat
{
port = 901
socket_type = stream
wait = no
only_from = localhost
user = root
server = /usr/sbin/swat
log_on_failure += USERID
disable = no
}

includedir /etc/xinetd.d
Last edited by keivn dodd on Fri Dec 12, 2008 1:07 am, edited 1 time in total.
keivn dodd
 
Posts: 43
Joined: Sat Sep 13, 2008 2:30 am

related deamons

Postby keivn dodd on Thu Dec 11, 2008 11:53 pm

SMB Deamon Suite - smbd, nmbd, winbindd

winbindd - Name Service Switch daemon for resolving names from NT servers
[url]http://linuxcommand.gds.tuwien.ac.at/man_pages/winbindd8.html[/url]
[color=#FF0000] /etc/nsswitch.conf - Config file
/tmp/.winbindd/pipe
$LOCKDIR/winbindd_privileged/pipe
/lib/libnss_winbind.so.X
$LOCKDIR/winbindd_idmap.tdb[/color]

smbd - provides file sharing and printing services to Windows clients.
[color=#FF0000] /usr/sbin/smbd[/color]

nmbd - provide netbios nameserver support to clients
[color=#FF0000] /usr/sbin/nmbd[/color]
Last edited by keivn dodd on Fri Dec 12, 2008 8:23 am, edited 1 time in total.
keivn dodd
 
Posts: 43
Joined: Sat Sep 13, 2008 2:30 am

Implimentation

Postby keivn dodd on Fri Dec 12, 2008 12:32 am

Trying to impliment it but still haven't quite figured it out. I got xinetd to load SWAT and I have smb, smbd, and nmbd running. I think there is still something I'm missing.

[color=#FF0000]/var/log/samba # service smb restart[/color]
Shutting down Samba SMB daemon [color=#008000]done[/color]
Starting Samba SMB daemon [color=#008000]done[/color]
[color=#FF0000]/var/log/samba # /usr/sbin/smbd -D[/color]
[color=#FF0000]/var/log/samba # /usr/sbin/nmbd -D[/color]
[color=#FF0000]/usr/bin/smbpasswd -a UserAccount[/color]
New SMB password:
Retype new SMB password:
Added user UserAccount.
[color=#FF0000]
/var/log/samba # /usr/bin/smbclient -L //Ikaras[/color]
Connection to Ikaras failed (Error NT_STATUS_BAD_NETWORK_NAME)
[color=#FF0000]/var/log/samba # /usr/bin/smbclient -L //10.17.7.2[/color]
Enter UserAccount's password:
Domain=[DOMAIN] OS=[Unix] Server=[Samba 3.2.0rc1-22.1-1795-SUSE-SL11.0]

Sharename Type Comment
--------- ---- -------
SHARE Disk Data Share
IPC$ IPC IPC Service (Samba 3.2.0rc1-22.1-1795-SUSE-SL11.0)
Receiving SMB: Server stopped responding
session setup failed: Call timed out: server did not respond after 20000 milliseconds
NetBIOS over TCP disabled -- no workgroup available
[color=#FF0000]/var/log/samba # /usr/bin/smbstatus[/color]

Samba version 3.2.0rc1-22.1-1795-SUSE-SL11.0
PID Username Group Machine
-------------------------------------------------------------------

Service pid machine Connected at
-------------------------------------------------------

No locked files

[color=#0000FF]# smb.conf is the main Samba configuration file. You find a full commented
# version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
# samba-doc package is installed.
# Date: 2008-06-06
[global]
workgroup = WORKGROUP

# printing = cupsi# printcap name = cups
# printcap cache time = 750
# cups options = raw
# map to guest = Bad User
# include = /etc/samba/dhcp.conf
# logon path = \\%L\profiles\.msprofile
# logon home = \\%L\%U\.9xprofile
# logon drive = P:
netbios name = ikaras
wins support = yes
host msdfs = yes
security = server
encrypt passwords = true
interfaces = eth0
bind interfaces only = yes
#HOST LIST
hosts allow = xxx.xxx.xxx 127.

[SHARE]
comment = Data Share
browsable = yes
writable = no
path = /Share
valid users = UserAccount

#[printers]
# comment = All Printers
# path = /var/tmp
# printable = Yes
# create mask = 0600
# browseable = No
#[print$]
# comment = Printer Drivers
# path = /var/lib/samba/drivers
# write list = @ntadmin root
# force group = ntadmin
# create mask = 0664
# directory mask = 0775[/color][/color]
keivn dodd
 
Posts: 43
Joined: Sat Sep 13, 2008 2:30 am


Return to CIS 191B - Fall 2008

Who is online

Users browsing this forum: No registered users and 0 guests

cron