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.
No comments:
Post a Comment