Instalação Samba
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
[root@bdora~]# yum install samba samba-client samba-common Loaded plugins: ulninfo Setting up Install Process Package samba-3.6.23-51.0.1.el6.x86_64 already installed and latest version Package samba-common-3.6.23-51.0.1.el6.x86_64 already installed and latest version Resolving Dependencies --> Running transaction check ---> Package samba-client.x86_64 0:3.6.23-51.0.1.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================================================================================== Package Arch Version Repository Size ======================================================================================================================================================================== Installing: samba-client x86_64 3.6.23-51.0.1.el6 public_ol6_latest 11 M Transaction Summary ======================================================================================================================================================================== Install 1 Package(s) Total download size: 11 M Installed size: 40 M Is this ok [y/N]: y Downloading Packages: samba-client-3.6.23-51.0.1.el6.x86_64.rpm | 11 MB 00:23 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : samba-client-3.6.23-51.0.1.el6.x86_64 1/1 Verifying : samba-client-3.6.23-51.0.1.el6.x86_64 1/1 Installed: samba-client.x86_64 0:3.6.23-51.0.1.el6 Complete! |
Backup arquivo de conf
1 |
[root@bdora]# cp /etc/samba/smb.conf smb.conf.bkp |
Alterar a linha security
1 |
security = user |
Adicione no arquivo
1 2 3 4 5 6 7 |
[backup] comment = Backup path = /u02/bkp public = yes writable = yes printable=no valid users = backup |
Crie o usuário backup
1 |
[root@bdora]# useradd backup |
Altere a senha usuário backup
1 2 3 4 |
[root@bdora]# smbpasswd -a backup New SMB password: Retype new SMB password: Added user backup. |
Habilitar inicialização do Samba
1 |
chkconfig smb on |
1 |
chkconfig nmb on |
Checar se foi adicionado
1 2 3 |
[root@bdora ]# chkconfig --list | grep mb nmb 0:off 1:off 2:on 3:on 4:on 5:on 6:off smb 0:off 1:off 2:on 3:on 4:on 5:on 6:off |
Iniciar serviço Samba
1 2 |
[root@bdora]# service smb start Starting SMB services: [ OK ] |
1 2 |
[root@bdora]# service nmb start Starting NMB services: [ OK ] |