Linux Lab and project latest
samba : start your samba service
netlogon syslog
vi /usr/local/samba
vi /usr/samba/etc/smb.conf
smbclient //localhost/netlogon -UAdministrator%"Supinfo -c "ls:
ls -al
vi /etc/resolv.conf
add these info in the file
domain nbouaziz.net
search nbouaziz.net
nameserver 192.168.1.10
cp /usr/local/samba/share/setup/krb5.conf /etc/
vi /etc/krb5.conf :
defoult_realm = NBOUAZIZ.NET
dns_lookup_realm ; false
dns_lookup_ :
vi /etc/
vi /etc/
vi /usr/local/samba/etc/smb.conf
host -t SRV _ldap._tcp.nvouaziz.net
samba_tool --help
samba_dns --help
kinit [email protected](if not work, need change password)
password : supinf0
samba-tool --help
samba-tool user --help
vi /etc/ntp.conf
samba-tool user --help
setexpiry
samba-tool user setexpiry -h | less
samba-tool user setexpiry --noexpiry administrator
vi /etc/hosts
vi /etc/hostname/
vi /etc/network/interfaces
address
netmask
gateway
vi /etc/resolv.cong
nameserver 114.114.114.114
apt-get update
apt-get dist-upgrade
apt-get update
apt-get install build-essential libacl1-dev libattr1-dev libblkid-dev libgnutls-dev libreadline-dev python-dev python-dnspython gdb pkg-config libpopt-dev libldap2-dev dnsutils libbsd-dev attr acl krb5-user docbook-xsl libcups2-dev libpam0g-dev ntpdate ntp -y
tar xvzdf samba_latest.tar.gz
cd samba-4.2.1
./configure --enable-debug --enable-selftest
make
make install
echo "export PATH=$PATH:/usr/local/samba/sbin:/usr/local/samba/bin" >> /root/.bashrc
source /root/.bashrc
vi /etc/fstab
add : /dev/sda1 / ext4 defaults,user_xattr,acl,barrier=1 1 1
init 6
take a snapshot
samba-tool domain provision --use-rfc2307 --interactive
: 114.114.114.114
password : Supinf0
vi /etc/network/interfaces
add : dns-nameservers 192.168.1.10
dns-search nbouaziz.net (it depends on your own vm)
vi /etc/resolv.conf
domain nbouaziz.net
search nbouaziz.net
nameserver 192.168.1.10 (it depends on your own vm)
vi /usr/local/samba/etc/smb.conf
make sure (dns forwarder = 114.114.114.114 or your own ip? )
cp /usr/local/samba/share/setup/krb5.conf /etc/
vi /etc/krb5.conf
make sure (default_realm = uppercase(domain))
init 6
samba (start service samba)
host -t SRV _ldap._tcp.nbouaziz.net
kinit administrator@domain
samba-tool user setexpiry --noexpiry administrator
init 0
work on GPO with samba-tools
DHCP
apt-get update
apt-get install dhcp3-server
vi /etc/dhcp/dhcp.conf
cp /etc/dhcp/dhcplconf /etc/dhcp/dhcp.conf.old
vi /etc/dhcp/dhcp.conf
subnet
range 192.168.1.50 192.168.0.200
option
option
option
/etc/init.d/isc-dhcp-server restart
cd /etc/init.d/
/etc/init.d/isc-dhcp-server status
ls /etc/init.d/
Remote Server Administration Tools for Windows 7 with Service Package
cd /usr/local/samba/private
cat dns_update_cache
ls
sanba_dnsupdate
cd ..
ls
cd share
cd setup
vi provision_computers_add.ldif
each time you create a zone, do this :
kinit [email protected] :
samba-tool dns zonecreate SRV 1.168.192 in-addr-arpa --useername=administrator
samba-tool user add test
vi /etc/passwd
vi /usr/local
vi /usr/local/samba/private/smbd.tmp.msg
vi /usr/local/samba/private
samba
ps aux | grep samba
samba-tool user add test1
/usr/local/samba/share/setup/ : ldif
rcp
scp
sftp
ssh
ssh-add
ssh-agent
ssh-keygen
ssh_config
man ls
man -a intro
www.howtoforge.com : provides user-friendly Linux tutorials (mainly samba3)
190 ssh [email protected]
191 ssh [email protected]
192 ssh 192.168.145.10
193 ssh [email protected]
194 ssh [email protected]
195 ping 192.168.145.10
196 ls
197 cd Desktop/
198 ls
199 scp samba-latest.tar.gz [email protected]:/root/
200 ssh [email protected]
201 history
root@server:~# history
1 halt
2 history
3 exit
4 halt
5 init 0
6 ifconfig
7 init 0
8 vi /etc/resolv.conf
9 vi /etc/network/interfaces
10 ifup eth0
11 ifdown eth0
12 if
13 ifconfig
14 /etc/init.d/networking restart
15 ifconfig
16 ifdown eth0
17 /etc/init.d/networking restart
18 vi /etc/network/interfaces
19 init 6
20 ifconfig
21 apt-get update
22 vi /etc/apt/sources.list
23 apt-get update
24 ls
25 apt-get dist-upgrade
26 init 0
27 vi /etc/hosts
28 vi /etc/hostname
29 vi /etc/network/interfaces
30 vi /etc/hosts
31 ifconfig
32 vi /etc/hosts
33 vi /etc/hostname
34 vi /etc/network/interfaces
35 vi /etc/resolv.conf
36 ifconfig
37 vi /etc/resolv.conf
38 vi /etc/network/interfaces
39 vi /etc/resolv.conf
40 apt-get update
41 apt-get dist-upgrade
42 apt-get update
43 ifconfig
44 apt-get install build-essential libacl1-dev libattr1-dev libblkid-dev libgnutls-dev libreadline-dev python-dev python-dnspython gdb pkg-config libpopt-dev libldap2-dev dnsutils libbsd-dev attr acl krb5-user docbook-xsl libcups2-dev libpam0g-dev ntpdate ntp -y
45 apt-get update
46 apt-get install build-essential libacl1-dev libattr1-dev libblkid-dev libgnutls-dev libreadline-dev python-dev python-dnspython gdb pkg-config libpopt-dev libldap2-dev dnsutils libbsd-dev attr acl krb5-user docbook-xsl libcups2-dev libpam0g-dev ntpdate ntp -y
47 apt-get install build-essential libacl1-dev libattr1-dev libblkid-dev libgnutls-dev libreadline-dev python-dev python-dnspython gdb pkg-config libpopt-dev libldap2-dev dnsutils libbsd-dev attr acl krb5-user docbook-xsl libcups2-dev libpam0g-dev ntpdate ntp -y
48 apt-get update
49 apt-get dist-upgrade
50 apt-get install build-essential libacl1-dev libattr1-dev libblkid-dev libgnutls-dev libreadline-dev python-dev python-dnspython gdb pkg-config libpopt-dev libldap2-dev dnsutils libbsd-dev attr acl krb5-user docbook-xsl libcups2-dev libpam0g-dev ntpdate ntp -y
51 tar xvzdf samba_latest.tar.gz
52 ifconfig
53 apt-get update
54 apt-get dist-upgrade
55 apt-get install build-essential libacl1-dev libattr1-dev libblkid-dev libgnutls-dev libreadline-dev python-dev python-dnspython gdb pkg-config libpopt-dev libldap2-dev dnsutils libbsd-dev attr acl krb5-user docbook-xsl libcups2-dev libpam0g-dev ntpdate ntp -y
56 history
57 apt-get dist-upgrade
58 apt-get update
59 vi /etc/resolv.conf
60 apt-get update
61 apt-get install build-essential libacl1-dev libattr1-dev libblkid-dev libgnutls-dev libreadline-dev python-dev python-dnspython gdb pkg-config libpopt-dev libldap2-dev dnsutils libbsd-dev attr acl krb5-user docbook-xsl libcups2-dev libpam0g-dev ntpdate ntp -y
62 vi /etc/hosts
63 vi /etc/hostname
64 vi /etc/resolv.conf
65 vi /etc/resolv.conf
66 ls
67 vi /etc/network/interface
68 vi /etc/network/interfaces
69 cd /usr/local/samba/vin
70 init 0
71 ls
72 cleqr
73 clear
74 ls
75 tar xvzf samba-latest.tar.gz
76 cd samba-4.2.1/
77 ls
78 ./configure --enable-debug --enable-selftest
79 make
80 make install
81 echo "export PATH=$PATH:/usr/local/samba/sbin:/usr/local/samba/bin" >> /root/.bashrc
82 source /root/.bashrc
83 vi etc/fstab
84 cd /etc/f
85 cd /etc/fsdev
86 vi /etc/sfdev
87 vi /etc/fstab
88 init 6
89 init 6
90 init 0
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。