Tuesday, October 21, 2014

SOALARIS 11 SAMBA SERVER CONFIGURATION

1)to add samba pkg
root@solaris2:~# pkg install samba
           Packages to install: 26
       Create boot environment: No
Create backup boot environment: No
            Services to change:  3
Planning linked: 0/1 done; 1 working: zone:testzone
Planning linked: 1/1 done
DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                              26/26     3450/3450    90.3/90.3  2.1M/s
Downloading linked: 0/1 done; 1 working: zone:testzone
Downloading linked: 1/1 done
PHASE                                          ITEMS
Installing new actions                     4666/4666
Updating package state database                 Done
Updating image state                            Done
Creating fast lookup database                   Done
Executing linked: 0/1 done; 1 working: zone:testzone
Executing linked: 1/1 done
2)to get user info
root@solaris2:~# logins -x -l test
test            100     staff           10
                        /export/home/test
                        /usr/bin/bash
                        PS 123013 -1 -1 -1
3)to configure samba
root@solaris2:~# cd /etc/samba/
root@solaris2:/etc/samba# pwd
/etc/samba
root@solaris2:/etc/samba# ls
private           smb.conf-example
root@solaris2:/etc/samba# cp smb.conf-example smb.conf
root@solaris2:/etc/samba# vi smb.conf
root@solaris2:/etc/samba# cat smb.conf
:
:
:
[testshare]
   comment = Mary's and Fred's stuff
   path = /var/share
   valid users = test
   public = no
   writable = yes
;   printable = no
;   create mask = 0765
root@solaris2:/var/share# svcs samba
STATE          STIME    FMRI
disabled       17:30:47 svc:/network/samba:default
root@solaris2:/var/share#
4)to add samba password
root@solaris2:~# smbpasswd -a test
New SMB password:
Retype new SMB password:
startsmbfilepwent_internal: file /etc/samba/private/smbpasswd did not exist. File successfully created.
Added user test.

root@solaris2:~# cat /etc/samba/private/smbpasswd
test:100:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:186CB09181E2C2ECAAC768C47C729904:[U          ]:LCT-52C1B11D:
5)to enable samba servie
root@solaris2:~# svcs samba
STATE          STIME    FMRI
disabled       17:30:47 svc:/network/samba:default
root@solaris2:~# svcadm enable samba
root@solaris2:~# svcs samba
STATE          STIME    FMRI
online         17:46:01 svc:/network/samba:default
6)to check samba client
root@solaris2:~# smbclient -L localhost -U test
Enter test's password:
dos charset 'CP850' unavailable - using ASCII
Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.6.12]
        Sharename       Type      Comment
        ---------       ----      -------
        testshare       Disk      Mary's and Fred's stuff
        IPC$            IPC       IPC Service (Samba Server)
        test            Disk      Home Directories
Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.6.12]
        Server               Comment
        ---------            -------
        Workgroup            Master
        ---------            -------
root@solaris2:~#

in windows :-
mounted success fully
mycomputer-->map network device --->username :==== Psswd:*******
in solaris:
root@rilcom:~# mount -F smbfs -o user=test //10.66.10.108/testshare /a
Password:

No comments:

Post a Comment