Title: samba notes Subject: samba notes http://www.skippy.net/linux/smb-howto.html Mounting Windows systems from Linux (with this you can run shell scripts against nt system) List Servers on an NT Domain: # smbclient -L PCD_SERVER_NAME -U -W DOMAIN_NAME -d3 List all shares on an NT system: # /usr/sbin/smbclient -L SERVER_Name -U -W DOMAIN_NAME -d3 To mount, put all this on one line: smbmount //SERVER_Name/SHARE_NAME /mnt/SERVER_NAME/SHARE_NAME -o username=, fmask=644,dmask=755,uid=,gid=,ip=,debug=0,workgroup=DOMAIN_NAME -------------------------------------------------------- STARTING SAMBA ................................ Soren Method ->slick ................................ type cd /etc/ smb.conf resides here if smb package was loaded in install. type ps this displays processes running type ps aux |grep mbd this will be empty if samba is not running type smbd& this starts the file and printer sharing type nmbd& this starts netbios service type ps aux |grep mbd processes will now show up. type samba status this should display: smbd (pid 1080) is running... nmbd (pid 1080) is running... start linuxconf, and go to user accounts/normal/user accounts create a group smb create a uer smbuser, group: smb home directory: /home/public logon: disabled password: type chown smbuser:smb /home/public type chmod 2777 /home/public now all files belong to in /home/samba belong to smb group, regardless of who creates them. type mkdir /home/samba in my case this dir already existed type chown smbuser:smb /home/samba type chmod 2770 /home/samba type mkdir /home/samba/data type chown smbuser:smb /home/samba/data type chmod 2770 /home/samba/data the data dir is only accessable to users who belong to smb group. to access this directory add a user to the smb group by editing the /etc/group file Now setup swat (samba web admin tool) type vi /etc/services you will find "swat 901/tcp" at the boottom of the file. type vi /etc/inetd.conf type /swat you will find "swat stream tcp nowait.400 root /usr/sbin/swat swat" type vi /etc/hosts.deny to secure swat from just any machine, "swat stream tcp nowait.400 root /usr/sbin/tcpd /usr/sbin/swat" type vi /etc/hosts.deny type "o" and "ALL:ALL" ":wq" type vi /etc/hosts.allow type "o" and "127.0.0.1" ":wq" now only the local machine (or a spoofer) can configure samba add additional ip's to give other machines edit access. type killall -HUP inetd this restarts inetd open a browser, and go to url: 127.0.0.1:901 this didn't work for me. Damn! OK, so I remved ALL:ALL from /etc/hosts.deny repeat killall -HUP inetd man samba for more information on what these things do. ........................................... cd samba.d ls mv smb.conf.sample smb.conf samba start CREATE SAMBA USER AND GROUPS coas/system/accounts/ add smbuser (useradd smbuser) make group (groupadd -g 505 smb) make directory for samba and public ( cd /home/ mkdir samba mkdir public chown smbuser:smb /home/public chmod 2777 /home/public --------------------------------------------------------- lilo -u will uninstall lilo but will not repair bmr mbrcheck.exe for nt and 9x will find the old mbr ----------------------------------------------------------- Administraton open browser on server. go to localhost:901 for samba www.flux.org for links to setup cable modem/dsl for fire wall in linux. we followed the book for most of the install. ------------------------------------------------------------