Skip to content

Instantly share code, notes, and snippets.

@fredericoramos
Created February 27, 2013 16:58
Show Gist options
  • Save fredericoramos/5049519 to your computer and use it in GitHub Desktop.
Save fredericoramos/5049519 to your computer and use it in GitHub Desktop.
Ubuntu - Installing Samba
==========================================================
==========================================================
Instalando Samba
Installing Samba
==========================================================
==========================================================
sudo aptitude install samba
sudo aptitude install smbclient
sudo aptitude install nfs-common
sudo vim /etc/samba/smb.conf
######################################
# CONFIGURANDO O SAMBA
# Configuring SAMBA
######################################
[global]
# Informar o nome do grupo de trabalho da sua rede
# Set your network work group name
workgroup = WORKGROUP
# Informar o nome NetBios da sua máquina
# Post your machine NetBios name
netbios name = srv01
# Informar uma descrição da máquina
# Post some description for your machine
server sring = Servidor 01 AtomTech
# Criar o seu compartilhamento - adicionar no final do arquivo
# Create your sharing - add in the end of file
[projects]
path = /media/projects
writable = yes
guest = yes
read only = no
guest ok = yes
######################################
# Criar o diretório compartilhamento
# Create the sharing directory
sudo mkdir /media/projects
# Adicionar permição de escrita e leitura na pasta
# Add write and read permission
sudo chmod -R 777 /mnt/shared/projects
# O Windows já vai reconhecer o diretório do Linux na Rede
# Windows will now recognize the Linux directory on the network
# Acessar um compartilhamento dentro do Linux no Windows
# Access some Windows sharing into the Linux
smbclient //fredwin/project -Umy_user_name%my_Pass_123
# Para listar os compartilhamentos do Host
# To list the Host Sharing
smbclient -L //fredwin -Umy_user_name%my_Pass_123
# Editar o fstab para facilitar a montagem
# Edit the fstab to make easy the mount command
# 192.168.1.102 = Windows IP
sudo vim /etc/fstab
//192.168.1.102/projects /mnt/projects cifs rw,username=my_user_name,password=my_Pass_123,uid=1000 0 0
# Para Montar a Unidade - só funcionará se o arquivo fstab estiver sido editado.
# Mount the network unit - only work if the fstab file is being edited.
mount /mnt/projects
# Para montar a unidade de rede toda vez que o linux iniciar
# To mount the network sharing every time that Linux Start
sudo vim /etc/rc.local
# Adicionar
# Add
mount /mnt/projects
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment