Sites

Wikipedia
SlashDot
Gentoo Linux
Loop-AES Encryption
Geoiptool
Showing posts with label Samba. Show all posts
Showing posts with label Samba. Show all posts

Friday, June 26, 2009

HowTo Install Samba Standalone Server

First We need to install Samba. This can be done by hand downloading and
installing each required dependency and compile it all from source. But I must agree
doing the same thing in Gentoo is much easier.



Install Samba


emerge -av samba



This command will then prompt you yes or no to continue. It may list other packages
to be installed that are necessary for samba to function properly.

Edit the smb.conf(samba Config file) :
Remove the # from infront of security = user



# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
# in the samba-doc package for details.
security = user




Close the file and restart Samba:

/etc/init.d/samba restart
Adding Samba Shares

How to add a share that is accessible by all users:


mkdir -p /home/shares/allusers
chown -R root:users /home/shares/allusers/
chmod -R ug+rwx,o+rx-w /home/shares/allusers/

At the end of the config file /etc/samba/smb.conf add the following lines:


[allusers]
comment = All Users
path = /home/shares/allusers
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
writable = yes

Now 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:



[homes]
comment = Home Directories
browseable = no
valid users = %S
writable = yes
create mask = 0700
directory mask = 0700


Now restart Samba One More Time:


/etc/init.d/samba restart

Adding And Managing Users


example: adding a user named dave. 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 dave -m -G users



Set a password for dave. If the user dave should not be able to log in to the Linux system, skip this step. (If the user is only supposed to have samba access you can skip this):


passwd dave

Now we need to add the user to Samba:

smbpasswd -a dave

Now you should be able to log in from your Windows workstation with the file explorer (address is \\ip.of.linux.server or \\192.168.0.100\dave for dave's home directory) using the username dave and the chosen password and store files on the Linux server either in dave's home directory or any other shares you created.

-Enjoy


Bookmark and Share