Humble Trader

Sunday, December 18, 2005

Configure samba

Introduction:

Samba allows non-Windoze computers to run Windoze-like print and file services. This lets you set up network printers - not that we'll be doing that here - and share files and directories across your network.

Aim:

We are going to set up two areas on the Linux server that can be accessed by the PC. One, /home/public, is freely acessible. The other, /home/steve, is my user's Linux home and is accessible from the PC but only by using Steve's Linux password.

Requirements:

You will need:

Procedure:
  • Log in as root
  • Open Terminal
  • # cd
  • # mkdir samba
  • # cd samba
  • Copy the following scripts into this directory - I usually put them on a floppy. (Hint: right-click the link and choose 'Save link as...'):
  • Run the installer:
    • # ./install.sh
      • If you get a message; : bad interpreter: No such file or directory, go here.
    • Enter your information at the prompts.
    • Samba is magically configured.
  • Add samba to init startup:
    • # cd /etc/init.d
    • # vi smb
    • Change the line '# chkconfig: - 91 35' to '# chkconfig: 35 91 35'. (This means that the smb daemon will be started whenever Linux goes into runlevel 3 or 5.)
    • # chkconfig --del smb
    • # chkconfig --add smb
  • Run the following command:
    • # service smb restart
    • and this is the result...
# service smb restart
Shutting down SMB services: [FAILED]
Shutting down NMB services: [FAILED]
Starting SMB services: [ OK ]
Starting NMB services: [ OK ]
#
  • Set up the smbpasswd file:
    • # cd /etc/samba
    • # cat /etc/passwd | mksmbpasswd.sh > smbpasswd
    • # smbpasswd steve
    • New SMB password: -steve's Linux account password-
    • Retype new SMB passwd: -likewise-
  • Create the public directory:
    • # cd /home
    • # mkdir public
    • # chmod 777 public
Testing:

Some testing is embedded in the procedure. This will be fully tested when we connect the network.

0 Comments:

Post a Comment

<< Home