This tutorial explains the installation of a Samba fileserver on OpenSUSE 11.4 and how to configure it to share files over the SMB protocol as well as how to add users. Samba is configured as a standalone server, not as a domain controller. In the resulting setup, every user has his own home directory accessible via the SMB protocol and all users have a shared directory with read-/write access.
Sabtu, 02 Juli 2011
Jumat, 01 Juli 2011
Samba 3.6.0 Approaching: Second Release Candidate Now Available
A second release candidate means that Samba 3.6 could be weeks or months away. 3.6.0 will see the first full featured implementation of SMB2 but it will be turned off by default...
A second release candidate means that Samba 3.6 could be weeks or months away. 3.6.0 will see the first full featured implementation of SMB2 but it will be turned off by default
Selasa, 31 Mei 2011
Fedora 14 Samba Standalone Server With tdbsam Backend
This tutorial explains the installation of a Samba fileserver on Fedora 14 and how to configure it to share files over the SMB protocol as well as how to add users. Samba is configured as a standalone server, not as a domain controller. In the resulting setup, every user has his own home directory accessible via the SMB protocol and all users have a shared directory with read-/write access.
I do not issue any guarantee that this will work for you!
I'm using a Fedora 14 system here with the hostname server1.example.com and the IP address 192.168.0.100.
Please make sure that SELinux is disabled as shown in chapter 5 of this tutorial: The Perfect Server - Fedora 14 x86_64 [ISPConfig 2] - Page 3
Connect to your server on the shell and install the Samba packages:
yum install cups-libs samba samba-commonEdit the smb.conf file:
vi /etc/samba/smb.confMake sure you see the following lines in the [global] section:
[...]# ----------------------- Standalone Server Options ------------------------## security = the mode Samba runs in. This can be set to user, share# (deprecated), or server (deprecated).## passdb backend = the backend used to store user information in. New# installations should use either tdbsam or ldapsam. No additional configuration# is required for tdbsam. The "smbpasswd" utility is available for backwards# compatibility.# security = user passdb backend = tdbsam[...]This enables Linux system users to log in to the Samba server.
Then create the system startup links for Samba and start it:
chkconfig --levels 235 smb on/etc/init.d/smb start
Now I will add a share that is accessible by all users.
Create the directory for sharing the files and change the group to the users group:
mkdir -p /home/shares/alluserschown -R root:users /home/shares/allusers/
chmod -R ug+rwx,o+rx-w /home/shares/allusers/
At the end of the file /etc/samba/smb.conf add the following lines:
vi /etc/samba/smb.conf[...][allusers] comment = All Users path = /home/shares/allusers valid users = @users force group = users create mask = 0660 directory mask = 0771 writable = yes
If you want all users to be able to read and write to their home directories via Samba, add the following lines to /etc/samba/smb.conf (make sure you comment out or remove the other [homes] section in the smb.conf file!):
[...][homes] comment = Home Directories browseable = no valid users = %S writable = yes create mask = 0700 directory mask = 0700Now we restart Samba:
/etc/init.d/smb restartIn this example, I will add a user named tom. You can add as many users as you need in the same way, just replace the username tom with the desired username in the commands.
useradd tom -m -G usersSet a password for tom in the Linux system user database. If the user tom should not be able to log into the Linux system, skip this step.
passwd tom-> Enter the password for the new user.
Now add the user to the Samba user database:
smbpasswd -a tom-> Enter the password for the new user.
Now you should be able to log in from your Windows workstation with the file explorer (address is \\192.168.0.100 or \\192.168.0.100\tom for tom's home directory) using the username tom and the chosen password and store files on the Linux server either in tom's home directory or in the public shared directory.
Jumat, 29 April 2011
Ubuntu 10.10 LAN Torrent Seedbox With Avalanche-rt, Lighttpd, Rtorrent, Vsftpd And Samba
This tutorial is based on a LAN setup, but it should also be applicable for an Internet seedbox (e.g. on a vps or rootds), but some additional steps may need to be performed (firewall, securing rpc-mount, generally hardening of the server).
The best lightweight software combination for a seedbox is lighttpd with rtorrent/libtorrent and a nifty web interface. So we use avalanche-rt, an actively developed project which looks very promising.
First step is to install the distribution of your choice on your box. Use a minimal installation if possible. The rest of the steps are Ubuntu specific.
At the end of the installation choose the ssh-server as additional service which should be installed.
After the reboot, first thing we need to do, is to connect to the Internet (if not already).
If you, like me, use a laptop as your server, you may want or need to use a wireless connection to connect to the Internet. You can do this without a graphical interface with the neat tool wicd-curses, an ncurses frontend for wicd.
Get it with (obviously you need to be connected to the Internet to perform this step, so in most cases you need a wired connection for at least this step):
sudo apt-get install wicd-ncursesAfterwards, you may have to manually start the wicd-daemon:
sudo /etc/init.d/wicd startThen you should be able to use wicd-curses and connect to your wireless network. If you are connected, perform a system update:
sudo apt-get update && sudo apt-get upgradeNext, we install some software which makes live a bit more easy:
sudo apt-get install htop mc pydfhtop lets you check you system, mc comes in kind handy when handling a lot of files and pydf gives you nice overview over the space left on your harddrive.
Let’s set up the seedbox:
First step is to install lighttpd and php:
sudo apt-get install lighttpd php5-cgi php5-curlThen we create a file to test if php is working:
sudo nano /var/www/phpinfo.phpFill it with:
If you now go to
you will just see a 403 (Forbidden) error
So we have to set up php to work with lighttpd:
sudo nano /etc/php5/cgi/php.iniSearch (strg + w)) for
cgi.fix_pathinfoand uncomment the line. Save and exit (strg + x).
Next, we configure lighttpd to use php5. Open lighttpd.conf...
sudo nano /etc/lighttpd/lighttpd.confand add to the
server.modulessection (right at the beginning of the file)
"mod_fastcgi"and at the end of the file the following:
fastcgi.server = ( ".php" => (( "bin-path" => "/usr/bin/php5-cgi", "socket" => "/tmp/php.socket" )))Then restart lighttpd:
sudo /etc/init.d/lighttpd restartIf we now go to
you should see some information about php.
Now we install more rtorrent and other needed software:
sudo apt-get install screen libtorrent11 rtorrentGet the default-config for rtorrent (we're in our home-directory now):
wget "http://libtorrent.rakshasa.no/export/1135/trunk/rtorrent/doc/rtorrent.rc"and move it to the right location:
mv rtorrent.rc .rtorrent.rcCreate needed folders:
mkdir downloadsmkdir .session
mkdir torrents-watch
mkdir torrent-files
Next, edit .rtorrent.rc:
nano .rtorrent.rcLook for
directory =and uncomment it and change it to your needs (in our case: directory = /home/downloads/).
Next, search for
sessionand uncomment it and change it to your needs (in our case: session = /home/.session/).
Go to the end of .rtorrent.rc an insert the following:
#SCGI Serverscgi_port = 127.0.0.1:5001Save & exit nano (strg + x).
Now we can start rtorrent and check if scgi support is enabled:
rtorrentYou should see something like
"XMPLRPC initialized with 519 functions."Next step is to enable RPC with lighttpd:
sudo nano /etc/lighttpd/lighttpd.confAdd to the
server.modulessection the following:
"mod_scgi"and at the end of the file the following:
#SCGI Serverscgi.server = ("/RPC2" =>( "127.0.0.1" => ("host" => "127.0.0.1","port" => 5001,"check-local" => "disable")))and reload lighttpd:
sudo /etc/init.d/lighttpd restartBecause this is a LAN setup, we do not protect the RPC-mount with a username / password combination. You will find it on almost every other tutorial out there and you really should protect the RPC-mount-directory with a strong password if you intend to use your seedbox on a server exposed to the Internet. But in our case it is not necessary and just an additional point of failure.
So we now have rtorrent with xmlrpc enabled, and lighttpd with xmlrpc enabled. Now we need the avalanche-rt web interface.
Ubuntu 10.10 LAN Torrent Seedbox With Avalanche-rt, Lighttpd, Rtorrent, Vsftpd And Samba - Page 2