how to setup samba for linux config and allowing linux shares and adding users to samba commands
Page 1 of 1
how to setup samba for linux config and allowing linux shares and adding users to samba commands
http://www.linux.com/learn/tutorials/305771-quick-and-dirty-samba-setup
Opening Ports
adding users
http://www.cyberciti.biz/faq/adding-a-user-to-a-samba-smb-share/
sudo smbpasswd -a joe <<<<<<<< THIS LINE IS CRITICAL FOR ACCESSING NETWORK SHARES
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To setup samba config files for linux
look for your system drive and open folder called
now edit this file
to setup linux samba
now restart using this command
to find out what ports to open type this
grep -i NETBIOS /etc/services
now test on client side
find samba ports and allow in firewall if you cant connect from client side!
use below for quick answers (in reply section, also reply to that part not this one).
file manager to open with admin provaliges
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More help
Home Learn Linux Linux Tutorials Quick and dirty Samba setup
Quick and dirty Samba setup
Tuesday, 28 November 2006
Submit to Linkedin Submit to Stumbleupon
Most current Linux distributions, including Slackware 11, have Samba already installed and running after the system boots. This article assumes that Samba has been installed. The commands work for Slackware version 11 and 10.2, and likely many other Linux distros.
The first step is to create a share folder on your hard drive; for instance, /disk2/data. After that, you need to edit the smb.conf file, found in /etc/samba, and make it look something like this:
# Global parameters
[global]
workgroup = HOME
netbios name = SAMBA
server string = Samba Server %v
map to guest = Bad User
log file = /var/log/samba/log.%m
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
preferred master = No
local master = No
dns proxy = No
security = User
# Share
[Data]
path = /disk2/data
valid users = joel
read only = No
create mask = 0777
directory mask = 0777
You can copy and paste this into your conf file or make changes to your existing one.
The workgroup name needs to be the workgroup of your Windows computers, or your domain name. The netbios name is what will appear when you access the Linux computer from Windows. I am currently running a Windows domain with this setup, so I have the preferred master and local master set to no to avoid both servers from attempting to be the master browser. This will eliminate network conflicts on your Windows computers that can cause network-related outages.
For the share details, specify the valid users, or set them up later. In that section you can allow users to create their own folder and files for all to access.
The next step is to add users by the following command:
# useradd -c "Joel Nahrgang" joel
# smbpasswd -a joel
New SMB password: secret
Reenter SMB password: secret
Added user joel
Next, run the testparm command to ensure that the conf file is valid. If it returns no errors, restart Samba with the command /etc/rc.d/rc.samba restart. You should also make Samba executable when the server is rebooted with the command chmod 755 /etc/rc.d/rc.samba.
If you would like to tidy up your smb.conf file, the following commands will back up the file, then remove all the comments for easier reading:
# cd /etc/samba
# cp -a smb.conf smb.conf.master
# testparm -s smb.conf.master > smb.conf
Now you're ready to test Samba. On a Windows computer, you can either map a drive to the Samba server or access the drive using the Start-Run command and typing \\Samba\data, "Samba" being the server name and "data" being the shared folder.
A graphical Way of adding samba users to your samba server:
verify samba users with command:
- Code:
sudo apt-get install -y system-config-samba
- Code:
sudo system-config-samba
Opening Ports
adding users
http://www.cyberciti.biz/faq/adding-a-user-to-a-samba-smb-share/
sudo smbpasswd -a joe <<<<<<<< THIS LINE IS CRITICAL FOR ACCESSING NETWORK SHARES
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To setup samba config files for linux
look for your system drive and open folder called
- Code:
cd /etc/samba/
now edit this file
- Code:
sudo gedit smb.conf
to setup linux samba
now restart using this command
- Code:
sudo service smbd restart
to find out what ports to open type this
grep -i NETBIOS /etc/services
now test on client side
find samba ports and allow in firewall if you cant connect from client side!
use below for quick answers (in reply section, also reply to that part not this one).
file manager to open with admin provaliges
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More help
Home Learn Linux Linux Tutorials Quick and dirty Samba setup
Quick and dirty Samba setup
Tuesday, 28 November 2006
Submit to Linkedin Submit to Stumbleupon
Most current Linux distributions, including Slackware 11, have Samba already installed and running after the system boots. This article assumes that Samba has been installed. The commands work for Slackware version 11 and 10.2, and likely many other Linux distros.
The first step is to create a share folder on your hard drive; for instance, /disk2/data. After that, you need to edit the smb.conf file, found in /etc/samba, and make it look something like this:
# Global parameters
[global]
workgroup = HOME
netbios name = SAMBA
server string = Samba Server %v
map to guest = Bad User
log file = /var/log/samba/log.%m
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
preferred master = No
local master = No
dns proxy = No
security = User
# Share
[Data]
path = /disk2/data
valid users = joel
read only = No
create mask = 0777
directory mask = 0777
You can copy and paste this into your conf file or make changes to your existing one.
The workgroup name needs to be the workgroup of your Windows computers, or your domain name. The netbios name is what will appear when you access the Linux computer from Windows. I am currently running a Windows domain with this setup, so I have the preferred master and local master set to no to avoid both servers from attempting to be the master browser. This will eliminate network conflicts on your Windows computers that can cause network-related outages.
For the share details, specify the valid users, or set them up later. In that section you can allow users to create their own folder and files for all to access.
The next step is to add users by the following command:
# useradd -c "Joel Nahrgang" joel
# smbpasswd -a joel
New SMB password: secret
Reenter SMB password: secret
Added user joel
Next, run the testparm command to ensure that the conf file is valid. If it returns no errors, restart Samba with the command /etc/rc.d/rc.samba restart. You should also make Samba executable when the server is rebooted with the command chmod 755 /etc/rc.d/rc.samba.
If you would like to tidy up your smb.conf file, the following commands will back up the file, then remove all the comments for easier reading:
# cd /etc/samba
# cp -a smb.conf smb.conf.master
# testparm -s smb.conf.master > smb.conf
Now you're ready to test Samba. On a Windows computer, you can either map a drive to the Samba server or access the drive using the Start-Run command and typing \\Samba\data, "Samba" being the server name and "data" being the shared folder.
A graphical Way of adding samba users to your samba server:
- Code:
sudo apt-get install -y system-config-samba
- Code:
sudo system-config-samba
verify samba users with command:
- Code:
sudo pdbedit -L
Last edited by jamied_uk on 5th March 2018, 18:52; edited 15 times in total
Re: how to setup samba for linux config and allowing linux shares and adding users to samba commands
a way to find files where you can get sudo admin
File manager for linux
icons and files for for nautilus
/var/lib/menu-xdg/applications/menu-xdg
File manager for linux
icons and files for for nautilus
/var/lib/menu-xdg/applications/menu-xdg
Re: how to setup samba for linux config and allowing linux shares and adding users to samba commands
look for your system drive and open folder called
/etc/samba/
use above file manager to open with admin provaliges
/etc/samba/
use above file manager to open with admin provaliges
Re: how to setup samba for linux config and allowing linux shares and adding users to samba commands
Allowing Samba In Your Firewall
sudo
Just add "allow out" to the firewall:
sudo
Just add "allow out" to the firewall:
- Port 137/UDP - used by nmbd
- Port 138/UDP - used by nmbd
- Port 139/TCP - used by smbd
- Port 445/TCP - used by smbd
Similar topics
» windows xp and linux samba sharing folder shares
» setup config for linux
» How to fix samba in linux file missing config file error
» linux iptables adding rules
» Windows MMC Shares Plus Linux Web Server
» setup config for linux
» How to fix samba in linux file missing config file error
» linux iptables adding rules
» Windows MMC Shares Plus Linux Web Server
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum