GSTN - Cups documentation: Difference between revisions
No edit summary |
No edit summary |
||
| Line 5: | Line 5: | ||
Samba AD | |||
As is Build for Domain Controller installation | |||
Date : 08.08.2016 | |||
Document Version : 1.0 | |||
Table of Contents | |||
1.Setup a Samba Active Directory Domain Controller 4 | |||
1.1.Configure yum repository for Packages installation. 4 | |||
1.2.Assign the Ipv4 address and restart the network services. 5 | |||
1.3.Assign the Ipv6 address and restart the network services. And set hostname. 6 | |||
1.4.Edit /etc/hosts file and make below entries. 7 | |||
1.5.Restart network service. 8 | |||
1.6.Reboot server. 9 | |||
1.7.Install Dependencies for samba installation. 9 | |||
1.8.Dependencies Installation is completed. 10 | |||
2.Samba Installation 11 | |||
2.1.Download samba file from https://www.samba.org/ and extract it. 11 | |||
2.2.Enter in samba-4.4.4 directory and run configure command. 11 | |||
2.3.Run make command. 13 | |||
2.4.Run make install command. 14 | |||
2.5.Provision a new domain: 14 | |||
2.6.Provisioning completed successfully. 15 | |||
3.Initialisation 16 | |||
3.1.Samba doesn't yet have init scripts included 16 | |||
3.2.Set the permissions on samba4 file. 19 | |||
3.3.Restart samba 19 | |||
3.4.Run "smbclient" 20 | |||
3.5.Open /etc/named.conf file. 21 | |||
3.6.DNS keytab 22 | |||
3.7.Also make below entry in named.conf 22 | |||
3.8.Change the owner ship as below and restart named services. 23 | |||
3.9.Copy Kerberos 23 | |||
1. Setup a Samba Active Directory Domain Controller | |||
1.1. Configure yum repository for Packages installation. | |||
Edit /etc/yum.repos.d/local.repo | |||
# vi /etc/yum.repos.d/local.repo | |||
Make below entries. Save file and exit. | |||
[local] | |||
name=local | |||
baseurl=file:///mnt | |||
gpgcheck=0 | |||
enabled=1 | |||
1.2. Assign the Ipv4 address and restart the network services. | |||
# nmcli connection modify eth0 ipv4.addresses 172.18.101.14/24 ipv4.method manual ipv4.gateway 172.18.101.1 connection.autoconnect yes ipv4.dns 172.18.101.14 | |||
# systemctl restart network.service | |||
1.3. Assign the Ipv6 address and restart the network services. And set hostname. | |||
# nmcli connection modify eth0 ipv6.addresses 2404:a800:1000:d:7800::e/69 ipv6.method manual ipv6.gateway 2404:a800:1000:d:7800::1 connection.autoconnect yes ipv6.dns 2404:a800:1000:d:7800::e | |||
# hostnamectl set-hostname gd9103.gstn.local | |||
1.4. Edit /etc/hosts file and make below entries. | |||
# vi /etc/hosts | |||
172.18.101.14 gd9103.gstn.local gd9103 | |||
2404:a800:1000:d:7800::e gd9103.gstn.local gd9103 | |||
1.5. Restart network service. | |||
# systemctl restart network.service | |||
1.6. Reboot server. | |||
# init 6 | |||
1.7. Install Dependencies for samba installation. | |||
# yum install perl gcc attr libacl-devel libblkid-devel gnutls-devel readline-devel python-devel gdb pkgconfig krb5-workstation zlib-devel setroubleshoot-server libaio-devel setroubleshoot-plugins policycoreutils-python libsemanage-python perl-ExtUtils-MakeMaker perl-Parse-Yapp perl-Test-Base popt-devel libxml2-devel libattr-devel keyutils-libs-devel cups-devel bind-utils libxslt docbook-style-xsl openldap-devel autoconf python-crypto pam-devel | |||
1.8. Dependencies Installation is completed. | |||
2. Samba Installation | |||
2.1. Download samba file from https://www.samba.org/ and extract it. | |||
# tar xvzf samba-4.4.4.tar.gz | |||
2.2. Enter in samba-4.4.4 directory and run configure command. | |||
# cd samba-4.4.4/ | |||
# ./configure | |||
Now configure done successfully. | |||
2.3. Run make command. | |||
# make | |||
Make command finished successfully. | |||
2.4. Run make install command. | |||
# make install | |||
: | 2.5. Provision a new domain: | ||
# /usr/local/samba/bin/samba-tool domain provision --use-rfc2307 --interactive | |||
2.6. Provisioning completed successfully. | |||
3. Initialisation | |||
3.1. Samba doesn't yet have init scripts included | |||
1. we can copy script from below link. https://wiki.samba.org/index.php/Samba4/InitScript | |||
2. create a file /etc/rc.d/init.d/samba4 | |||
# vi /etc/rc.d/init.d/samba4 | |||
and paste the below content in this file. | |||
________________________________ | |||
#! /bin/bash | |||
# | |||
# samba4 Bring up/down samba4 service | |||
# | |||
# chkconfig: - 90 10 | |||
# description: Activates/Deactivates all samba4 interfaces configured to \ | |||
# start at boot time. | |||
# | |||
### BEGIN INIT INFO | |||
# Provides: | |||
# Should-Start: | |||
# Short-Description: Bring up/down samba4 | |||
# Description: Bring up/down samba4 | |||
### END INIT INFO | |||
# Source function library. | |||
. /etc/init.d/functions | |||
if [ -f /etc/sysconfig/samba4 ]; then | |||
. /etc/sysconfig/samba4 | |||
fi | |||
CWD=$(pwd) | |||
prog="samba4" | |||
start() { | |||
# Attach irda device | |||
echo -n $"Starting $prog: " | |||
/usr/local/samba/sbin/samba | |||
sleep 2 | |||
if ps ax | grep -v "grep" | grep -q /samba/sbin/samba ; then success $"samba4 startup"; else failure $"samba4 startup"; fi | |||
echo | |||
} | |||
stop() { | |||
# Stop service. | |||
echo -n $"Shutting down $prog: " | |||
killall samba | |||
sleep 2 | |||
if ps ax | grep -v "grep" | grep -q /samba/sbin/samba ; then failure $"samba4 shutdown"; else success $"samba4 shutdown"; fi | |||
echo | |||
} | |||
status() { | |||
/usr/local/samba/sbin/samba --show-build | |||
} | |||
# See how we were called. | |||
case "$1" in | |||
start) | |||
start | |||
;; | |||
stop) | |||
stop | |||
;; | |||
status) | |||
status irattach | |||
;; | |||
restart|reload) | |||
stop | |||
start | |||
;; | |||
*) | |||
echo $"Usage: $0 {start|stop|restart|status}" | |||
exit 1 | |||
esac | |||
exit 0 | |||
______________________________________________________________________________ | |||
| Line 75: | Line 234: | ||
3.2. Set the permissions on samba4 file. | |||
# chmod 755 /etc/rc.d/init.d/samba4 | |||
# chmod +x /etc/rc.d/init.d/samba4 | |||
# ln -s /etc/rc.d/init.d/samba4 /etc/rc3.d/S80samba4 | |||
# chkconfig --add samba4 | |||
# chkconfig samba4 on | |||
3.3. Restart samba | |||
# service samba4 restart | |||
or systemctl start samba4.service | |||
3.4. Run "smbclient" | |||
This is done to check if Samba provides the AD DC default shares "netlogon" and "sysvol", that were created in "smb.conf" during provisioning. | |||
# /usr/local/samba/bin/smbclient -L localhost -U% | |||
3.5. Open /etc/named.conf file. | |||
# vi /etc/named.conf | |||
3.6. DNS keytab | |||
This file was automatically created during provisioning/updating. Add the following' tkey-gssapi-keytab' option to the 'options' section of your named.conf, and set other values as shown in screen shot. | |||
tkey-gssapi-keytab "/usr/local/samba/private/dns.keytab"; | |||
3.7. Also make below entry in named.conf | |||
include "/usr/local/samba/private/named.conf"; | |||
3.8. Change the owner ship as below and restart named services. | |||
# chown named.named /var/named/ | |||
# chgrp named /usr/local/samba/private/dns.keytab | |||
# chmod g+r /usr/local/samba/private/dns.keytab | |||
# systemctl enable named.service | |||
# systemctl restart named.service | |||
3.9. Copy Kerberos | |||
file /usr/local/samba/private/krb5.conf to /etc/krb5.conf | |||
# cp /etc/krb5.conf /etc/krb5.conf.ori | |||
# cp /usr/local/samba/private/krb5.conf /etc/krb5.conf | |||
Revision as of 04:10, 1 February 2019
Samba AD As is Build for Domain Controller installation Date : 08.08.2016 Document Version : 1.0
Table of Contents
1.Setup a Samba Active Directory Domain Controller 4
1.1.Configure yum repository for Packages installation. 4
1.2.Assign the Ipv4 address and restart the network services. 5
1.3.Assign the Ipv6 address and restart the network services. And set hostname. 6
1.4.Edit /etc/hosts file and make below entries. 7
1.5.Restart network service. 8
1.6.Reboot server. 9
1.7.Install Dependencies for samba installation. 9
1.8.Dependencies Installation is completed. 10
2.Samba Installation 11
2.1.Download samba file from https://www.samba.org/ and extract it. 11
2.2.Enter in samba-4.4.4 directory and run configure command. 11
2.3.Run make command. 13
2.4.Run make install command. 14
2.5.Provision a new domain: 14
2.6.Provisioning completed successfully. 15
3.Initialisation 16
3.1.Samba doesn't yet have init scripts included 16
3.2.Set the permissions on samba4 file. 19
3.3.Restart samba 19
3.4.Run "smbclient" 20
3.5.Open /etc/named.conf file. 21
3.6.DNS keytab 22
3.7.Also make below entry in named.conf 22
3.8.Change the owner ship as below and restart named services. 23
3.9.Copy Kerberos 23
1. Setup a Samba Active Directory Domain Controller
1.1. Configure yum repository for Packages installation.
Edit /etc/yum.repos.d/local.repo
- vi /etc/yum.repos.d/local.repo
Make below entries. Save file and exit.
[local]
name=local
baseurl=file:///mnt
gpgcheck=0
enabled=1
1.2. Assign the Ipv4 address and restart the network services.
- nmcli connection modify eth0 ipv4.addresses 172.18.101.14/24 ipv4.method manual ipv4.gateway 172.18.101.1 connection.autoconnect yes ipv4.dns 172.18.101.14
- systemctl restart network.service
1.3. Assign the Ipv6 address and restart the network services. And set hostname.
- nmcli connection modify eth0 ipv6.addresses 2404:a800:1000:d:7800::e/69 ipv6.method manual ipv6.gateway 2404:a800:1000:d:7800::1 connection.autoconnect yes ipv6.dns 2404:a800:1000:d:7800::e
- hostnamectl set-hostname gd9103.gstn.local
1.4. Edit /etc/hosts file and make below entries.
- vi /etc/hosts
172.18.101.14 gd9103.gstn.local gd9103
2404:a800:1000:d:7800::e gd9103.gstn.local gd9103
1.5. Restart network service.
- systemctl restart network.service
1.6. Reboot server.
- init 6
1.7. Install Dependencies for samba installation.
- yum install perl gcc attr libacl-devel libblkid-devel gnutls-devel readline-devel python-devel gdb pkgconfig krb5-workstation zlib-devel setroubleshoot-server libaio-devel setroubleshoot-plugins policycoreutils-python libsemanage-python perl-ExtUtils-MakeMaker perl-Parse-Yapp perl-Test-Base popt-devel libxml2-devel libattr-devel keyutils-libs-devel cups-devel bind-utils libxslt docbook-style-xsl openldap-devel autoconf python-crypto pam-devel
1.8. Dependencies Installation is completed.
2. Samba Installation
2.1. Download samba file from https://www.samba.org/ and extract it.
- tar xvzf samba-4.4.4.tar.gz
2.2. Enter in samba-4.4.4 directory and run configure command.
- cd samba-4.4.4/
- ./configure
Now configure done successfully.
2.3. Run make command.
# make
Make command finished successfully.
2.4. Run make install command.
- make install
2.5. Provision a new domain:
- /usr/local/samba/bin/samba-tool domain provision --use-rfc2307 --interactive
2.6. Provisioning completed successfully.
3. Initialisation 3.1. Samba doesn't yet have init scripts included 1. we can copy script from below link. https://wiki.samba.org/index.php/Samba4/InitScript 2. create a file /etc/rc.d/init.d/samba4
- vi /etc/rc.d/init.d/samba4
and paste the below content in this file. ________________________________
- ! /bin/bash
- samba4 Bring up/down samba4 service
- chkconfig: - 90 10
- description: Activates/Deactivates all samba4 interfaces configured to \
- start at boot time.
-
- BEGIN INIT INFO
- Provides:
- Should-Start:
- Short-Description: Bring up/down samba4
- Description: Bring up/down samba4
- END INIT INFO
- Source function library.
. /etc/init.d/functions if [ -f /etc/sysconfig/samba4 ]; then . /etc/sysconfig/samba4 fi CWD=$(pwd) prog="samba4" start() {
- Attach irda device
echo -n $"Starting $prog: " /usr/local/samba/sbin/samba sleep 2 if ps ax | grep -v "grep" | grep -q /samba/sbin/samba ; then success $"samba4 startup"; else failure $"samba4 startup"; fi echo } stop() {
- Stop service.
echo -n $"Shutting down $prog: " killall samba sleep 2 if ps ax | grep -v "grep" | grep -q /samba/sbin/samba ; then failure $"samba4 shutdown"; else success $"samba4 shutdown"; fi echo } status() { /usr/local/samba/sbin/samba --show-build }
- See how we were called.
case "$1" in start) start
stop) stop
status) status irattach
restart|reload) stop start
- )
echo $"Usage: $0 {start|stop|restart|status}" exit 1 esac exit 0 ______________________________________________________________________________
3.2. Set the permissions on samba4 file.
- chmod 755 /etc/rc.d/init.d/samba4
- chmod +x /etc/rc.d/init.d/samba4
- ln -s /etc/rc.d/init.d/samba4 /etc/rc3.d/S80samba4
- chkconfig --add samba4
- chkconfig samba4 on
3.3. Restart samba
- service samba4 restart
or systemctl start samba4.service
3.4. Run "smbclient" This is done to check if Samba provides the AD DC default shares "netlogon" and "sysvol", that were created in "smb.conf" during provisioning.
- /usr/local/samba/bin/smbclient -L localhost -U%
3.5. Open /etc/named.conf file.
- vi /etc/named.conf
3.6. DNS keytab
This file was automatically created during provisioning/updating. Add the following' tkey-gssapi-keytab' option to the 'options' section of your named.conf, and set other values as shown in screen shot.
tkey-gssapi-keytab "/usr/local/samba/private/dns.keytab";
3.7. Also make below entry in named.conf
include "/usr/local/samba/private/named.conf";
3.8. Change the owner ship as below and restart named services.
- chown named.named /var/named/
- chgrp named /usr/local/samba/private/dns.keytab
- chmod g+r /usr/local/samba/private/dns.keytab
- systemctl enable named.service
- systemctl restart named.service
3.9. Copy Kerberos
file /usr/local/samba/private/krb5.conf to /etc/krb5.conf
- cp /etc/krb5.conf /etc/krb5.conf.ori
- cp /usr/local/samba/private/krb5.conf /etc/krb5.conf