comandos parte2
comandos parte2
vi /etc/samba/smb.conf
[global]
workgroup = CERTIFICACAO
map to guest = Bad User
include = /etc/samba/dhcp.conf
logon path = \\%L\profiles\.msprofile
logon home = \\%L\%U\.9xprofile
logon drive = P:
usershare allow guests = No
idmap gid = 10000-20000
idmap uid = 10000-20000
realm = CERTIFICACAO.COM
security = ADS
template homedir = /home/%D/%U
template shell = /bin/bash
winbind offline logon = yes
winbind refresh tickets = yes
password server = 10.211.55.13
winbind separator = + # some applications get confused with \
winbind enum users = yes
winbind enum groups = yes
winbind nested groups = Yes
winbind use default domain = yes
encrypt passwords = yes
socket options = TCP_NODELAY SO_RCVBUF=16384 SO_SNDBUF=16384
log level = 3 passdb:5 auth:3 winbind:3
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes
klist
net ads join -Uadministrator
net rpc join -Uadministrator
net ads testjoin -Uadministrator
net ads keytab list -Uadministrator
net rpc trustdom list -Uadministrator
net ads user -U administrator
net ads group -U administrator
wbinfo -a administrator%1eimg2eimm!
wbinfo -D certificacao
wbinfo -t
wbinfo -i administrator
wbinfo -u
wbinfo -g
groupadd squid
useradd -g squid -d /var/cache/squid -s /bin/false squid
chown root:squid /var/lib/samba/winbindd_privileged
chmod 750 /var/lib/samba/winbindd_privileged
vi /usr/local/squid/etc/squid.conf
cache_effective_user squid
cache_effective_group squid
visible_hostname linux-jw8v.certificacao.com
#
# apache
#
a2enmod authnz_ldap
a2enmod ldap
mkdir /srv/www/htdocs/secreto
rcapache restart
vi /etc/apache2/httpd.conf
#
# postfix
#
vi ldap-users.cf
server_host = 10.211.55.13
search_base = dc=certificacao,dc=com
version = 3
query_filter = (&(objectclass=person)(samaccountname=%s))
result_attribute = samaccountname
result_format = %u/Maildir/
bind = yes
bind_dn = [email protected]
bind_pw = 1eimg2eimm!
vi /etc/postfix/main.cf
smtpd_banner = $myhostname ESMTP $mail_name (GNU)
biff = no
readme_directory = no
# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = certificacao.com, localhost.localdomain, localhost
home_mailbox = Maildir/
relayhost =
mynetworks = 127.0.0.0/8 ,10.0.0.0/16
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
virtual_mailbox_domains = ubuntu.certificacao.com
virtual_mailbox_base = /home/vmail/
virtual_mailbox_maps = ldap:/etc/postfix/ldap-users.cf
virtual_uid_maps = static:1001 # Aqui coloca-se o valor do uid do usuario vmail
virtual_gid_maps = static:1001 # Aqui coloca-se o valor do gid do usuario vmail
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated, reject_unauth_destination
broken_sasl_auth_clients = yes
vi /etc/dovecot/dovecot.conf
mail_location = maildir:/home/vmail/%u/Maildir/
mail_privileged_group = mail
mail_debug = no
valid_chroot_dirs = /home/vmail
maildir_copy_with_hardlinks = yes
protocol imap {
mail_plugin_dir = /usr/lib/dovecot/modules/imap
imap_client_workarounds = delay-newmail outlook-idle netscape-eoh
}
protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
mail_plugin_dir = /usr/lib/dovecot/modules/pop3
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
}
protocol managesieve {
sieve=~/.dovecot.sieve
sieve_storage=~/sieve
}
auth_username_format = %Lu
auth_debug = no
auth default {
mechanisms = plain login
socket listen {
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}
passdb ldap {
args = /etc/dovecot/dovecot-ldap.conf
}
userdb static {
args = uid=1001 gid=1001 home=/home/vmail/%u
}
socket listen {
master {
path = /var/run/dovecot/auth-master
mode = 0600
user = vmail
group = vmail
}
client {
path = /var/run/dovecot/auth-client
mode = 0660
}
}
vi dovecot-ldap.conf
hosts = 10.211.55.13
base = dc=certificacao,dc=com
ldap_version = 3
auth_bind = yes
auth_bind_userdn = certificacao\%u