Steps to Join the ubuntu system in gc-solutions

System IP 192.168.2.123
Admin user: rajeshk
PWD: Gcube#123$
root pwd: Gcube#123$

*******************************************************************************
Install package
sudo apt-get install samba acl attr quota fam winbind libpam-winbind libpam-krb5 libnss-winbind krb5-config krb5-user ntp dnsutils ldb-tools

gc-solutions
amazon.gc-solutions.net
amazon.gc-solutions.net

now login as root

service smbd stop
service nmbd stop
service winbind stop

Vim /etc/samba/smb.conf

[global]
workgroup = gc-solutions
security = domain
realm = amazon.gc-solutions.net

dedicated keytab file = /etc/krb5.keytab
kerberos method = secrets and keytab
server string = Data %h

winbind use default domain = yes
winbind expand groups = 4
winbind nss info = rfc2307
winbind refresh tickets = Yes
winbind offline logon = yes
winbind normalize names = Yes

## map ids outside of domain to tdb files.
idmap config *:backend = tdb
idmap config *:range = 2000-9999
## map ids from the domain the ranges may not overlap !
idmap config gc-solutions : backend = rid
idmap config gc-solutions : range = 10000-999999
template shell = /bin/bash
template homedir = /home/gc-solutions/%U

domain master = no
local master = no
preferred master = no
os level = 20
map to guest = bad user
host msdfs = no

# user Administrator workaround, without it you are unable to set privileges
username map = /etc/samba/user.map

# For ACL support on domain member
vfs objects = acl_xattr
map acl inherit = Yes
store dos attributes = Yes

# Share Setting Globally
unix extensions = no
reset on zero vc = yes
veto files = /.bash_logout/.bash_profile/.bash_history/.bashrc/
hide unreadable = yes

# disable printing completely
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
client ipc signing = auto



mkdir /home/gc-solutions
chmod -R 777 /home/gc-solutions

echo "session required pam_mkhomedir.so umask=0022 skel=/etc/skel" >> /etc/pam.d/common-session


vim etc/samba/user.map
!root = gc-solutions\root gc-solutions\root root root


vim /etc/nsswitch.conf

# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd: compat files winbind
group: compat files winbind
shadow: compat files

hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
networks: files

protocols: db files
services: db files
ethers: db files
rpc: db files

netgroup: nis


Now join the domain:

net ads join -U root

service smbd start
service nmbd start
service winbind start


Test the system
getent passwd manager

now login as domain user in putty

192.168.2.123
gc-solutions\temp
temp