In the name of Allah, Most Gracious, Most Merciful
Samba comes installed with Oracle Solaris 10. We only have to configure it according to our needs. Following are steps to properly configure samba according to our needs.
You can verify that samba packages are already installed in Oracle Solaris 10 by following command.
1. pkginfo -x | grep -i samba
SUNWsmbac samba - A Windows SMB/CIFS fileserver for UNIX (client)
SUNWsmbar samba - A Windows SMB/CIFS fileserver for UNIX (Root)
SUNWsmbau samba - A Windows SMB/CIFS fileserver for UNIX (Usr)
2. You can check the location of samba config file by following command
pkgchk -l SUNWsmbar | grep conf-example
Pathname: /etc/samba/smb.conf-example
3. Check current state of samba
svcs -a | grep samba
disabled Feb_22 svc:/network/samba:default
4. Try to enable samba
svcadm enable samba
maintenance 10:27:33 svc:/network/samba:default
It is not enabled, but it is in maintenance mode. You can check the errors encountered while enabling samba by following command.
tail /var/adm/messages
mysystem svc.startd[8]: [ID 652011 daemon.warning] svc:/network/samba:default: Method "/usr/sbin/smbd -D" failed with exit status 1
It means samba failed to start, it most likely due to missing config file.
5. Now copy the sample config file and modify it
cp /etc/samba/smb.conf-example /etc/samba/smb.conf
By default config file is readonly, so make is right able by following command.
chmod 0777 /etc/samba/smb.conf
vi /etc/samba/smb.conf
Add following section in smb.conf file.
[myshare]
comment = My Share
force user = oracle
path = /u01/app/oracle
writeable = no
guest ok = yes
now save file and exit vi.
6. Now change the rights on smb.conf file as before
chmod 0444 /etc/samba/smb.conf
7. Now try to disable samba
svcadm disable samba
svcs -a | grep samba
disabled 10:41:49 svc:/network/samba:default
8. Now try to enable samba again
svcadm enable samba
svcs -a | grep samba
online 10:42:04 svc:/network/samba:default
9. Now set password for oracle user to use "myshare".
smbpasswd -a oracle
10. Now on windows try to map drive
net use O: \\192.168.1.20\myshare
Configuration of samba completes. In-sha-Allah this will help and serve the purpose. For any corrections and improvements please suggest.
Samba comes installed with Oracle Solaris 10. We only have to configure it according to our needs. Following are steps to properly configure samba according to our needs.
You can verify that samba packages are already installed in Oracle Solaris 10 by following command.
1. pkginfo -x | grep -i samba
SUNWsmbac samba - A Windows SMB/CIFS fileserver for UNIX (client)
SUNWsmbar samba - A Windows SMB/CIFS fileserver for UNIX (Root)
SUNWsmbau samba - A Windows SMB/CIFS fileserver for UNIX (Usr)
2. You can check the location of samba config file by following command
pkgchk -l SUNWsmbar | grep conf-example
Pathname: /etc/samba/smb.conf-example
3. Check current state of samba
svcs -a | grep samba
disabled Feb_22 svc:/network/samba:default
4. Try to enable samba
svcadm enable samba
maintenance 10:27:33 svc:/network/samba:default
It is not enabled, but it is in maintenance mode. You can check the errors encountered while enabling samba by following command.
tail /var/adm/messages
mysystem svc.startd[8]: [ID 652011 daemon.warning] svc:/network/samba:default: Method "/usr/sbin/smbd -D" failed with exit status 1
It means samba failed to start, it most likely due to missing config file.
5. Now copy the sample config file and modify it
cp /etc/samba/smb.conf-example /etc/samba/smb.conf
By default config file is readonly, so make is right able by following command.
chmod 0777 /etc/samba/smb.conf
vi /etc/samba/smb.conf
Add following section in smb.conf file.
[myshare]
comment = My Share
force user = oracle
path = /u01/app/oracle
writeable = no
guest ok = yes
now save file and exit vi.
6. Now change the rights on smb.conf file as before
chmod 0444 /etc/samba/smb.conf
7. Now try to disable samba
svcadm disable samba
svcs -a | grep samba
disabled 10:41:49 svc:/network/samba:default
8. Now try to enable samba again
svcadm enable samba
svcs -a | grep samba
online 10:42:04 svc:/network/samba:default
9. Now set password for oracle user to use "myshare".
smbpasswd -a oracle
10. Now on windows try to map drive
net use O: \\192.168.1.20\myshare
Configuration of samba completes. In-sha-Allah this will help and serve the purpose. For any corrections and improvements please suggest.
Assalamwalikum,
ReplyDeleteVery gud article. Thanks for sharing this.
Asif
extremely useful and works! Thank you..
ReplyDeletevery precise and accurate.. Thanks for sharing this.
ReplyDeletebaraka Allahu fik my brother ..... very useful
ReplyDeleteSimple, straight forward, Excellent!!! Jazakallah Khair..
ReplyDeleteJazakallahu Khairan. . . .
ReplyDeleteOne of the best article Nazir Bhai...
ReplyDeleteThank you very much ...
Jazakumullah khair....
Good info. but you can some more info. if samba not installed how install pkg's
ReplyDeleteThanks
Naseer, This is very helpful and useful step. Thanks for sharing this.
ReplyDeleteHi Kim,
you can install it from solaris OS CD. just go into product and perform the pkgadd
Thanks
Hi Nasir Bhai,
ReplyDeleteThis has resolved my problem..
May Allah bless you with all Happiness..
--Ravi
Good info Nasir...
ReplyDeletethanks you sir.
ReplyDeleteThank you Nasir Zeeshan , your blogspot site is very helpful for me.
ReplyDeleteThanks a lot Nasir bhai.
ReplyDeleteI am facing few issues after sharing the Solaris folder, Could you please share your email id so that we can discuss over chat?
Assalamualaikum. thanks for the good info brother.
ReplyDeleteMasha Allah..Great job done...Keep up the good work... :)
ReplyDeleteThanks for sharing it
ReplyDeleteThanks for sharing it. It has helped me a lot.
ReplyDeletewhen you open with hostname in window's(\\orange) it's not open,but when you open with ip (\\192.168.1.10) the share folder is open.kindly share the solution,it will helpful for others.
ReplyDeleteGood day Shiva,
DeleteHave you configured hostname orange in your hosts file in windows. If not please set it in hosts file and try ping with hostname. If it work \\orange will also work.
I hope it will fix the problem,
Regards,
Nasir Zeeshan
450 pc is there in our setup,already DNS configured in solaris samba . not possible to configure host entry in all 450 servers,any other alternate solution is there???
DeleteDNS entry is also fine, make sure ping works.
DeleteFrom Windows server getting below error while trying to share the drive
ReplyDeleteSystem error 1312 has occurred.
A specified logon session does not exist. It may already have been terminated.
Please check the following link. I hope it will help.
Deletehttps://social.technet.microsoft.com/Forums/windowsserver/en-US/4bb8261f-7851-44b5-b3b1-b58067a0bdb0/remoting-net-use-on-dfs-share-error-1312?forum=winserverfiles
It may useful to add "host allow" parameter in your article. Thanks
ReplyDeletewhen i use smbpasswd -a user i get this msg
ReplyDeleteFailed to add entry for user user
please use user other then "user"
DeleteCool and that i have a dandy present: How Much Home Renovation Cost house renovation contractors near me
ReplyDelete