In this entry I'll show you how to access Microsoft Windows shares that may be running alongside OpenSolaris on your network.
Step 1: Share The Windows Folder
The first step is to make sure the folder you want to access is shared by Windows. On Windows XP you can access this by viewing the properties for the folder and selecting the Sharing tab:
For this example, I'm going to share my entire My Documents directory. The share name will be easiest to work with from OpenSolaris if it doesn't contain any spaces, hence I'm using 'MyDocuments'.
Also make a note of the hostname or IP address of the Windows machine. Ideally you'll use a hostname, especially if your router is configured for DHCP, but you can also use an IP address as a fall back option.
To determine your hostname, run hostname from the command line:
C:\Documents and Settings\Brian>hostname Integrity C:\Documents and Settings\Brian>
You can determine the IP address by running ipconfig:
C:\Documents and Settings\Brian>ipconfig Windows IP Configuration Ethernet adapter Wireless Network Connection: Connection-specific DNS Suffix . : hsd1.ct.comcast.net. IP Address. . . . . . . . . . . . : 10.0.1.200 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 10.0.1.1 C:\Documents and Settings\Brian>
Finally, if you are running any type of firewall on the Windows machine, be sure to configure it so that your OpenSolaris machine is allowed to connect to it.
Step 2: Access the Share from OpenSolaris
Option 1: Using the Connect to Server Dialog
Select Connect to Server from the Places menu
Change the Service type to Custom Location and set the Location URI to the following:
smb://[windows hostname or IP address]/[share name]
So for my example above it would be:
smb://integrity.local/MyDocuments or smb://10.0.1.200/MyDocuments.
Then give the connection a name and click connect:
You'll then find the connection available on your desktop and in the Places menu:
Upon opening the connection you can view and edit the files on the Windows share:
The connection will persist across restarts. To remove it, right-click the connection and select unmount.
Option 2: Using mount
You can run the smbutil command to view the available resources on a particular host:
bleonard@opensolaris:~$ smbutil view //integrity.local Password: Share Type Comment ------------------------------- MyDocuments disk IPC$ IPC Remote IPC ADMIN$ disk Remote Admin C$ disk Default share 4 shares listed from 4 available bleonard@opensolaris:~$
Make a home for the share. I've created a folder called IntegrityDocs off of my home folder.
Before we can do the mount we must first enable the smb client:
svcadm enable /network/smb/client
Mount the share, replacing my userid (bleonard) with yours. If you've set the share up with a password, enter it at the prompt, otherwise just press enter to proceed:
bleonard@opensolaris:~$ mount -F smbfs -o uid=bleonard,gid=staff //integrity.local/MyDocuments ~/IntegrityDocs Password: bleonard@opensolaris:~$
The uid and gid options give your user privileges to write to the share. If you leave those options out only the root user will have write privileges.
Finally, I don't believe an smbfs can be mounted at boot, however, by adding an entry to your /etc/vfstab file, you can significantly shorten the mount command as the rest of the properties will be pulled from the vfstab file. For example, I would add the following:
//integrity.local/MyDocuments - /export/home/bleonard/IntegrityDocs smbfs - no uid=bleonard,gid=staff
Now I can mount the share using either:
mount //integrity.local/MyDocuments
or:
mount /export/home/bleonard/IntegrityDocs
相关推荐
"Accessing Web Services from a Visual Web Application"这一主题主要关注如何在基于Visual Web的应用程序中集成Web服务。Visual Web工具通常提供了直观的界面,使开发者能够轻松地连接到Web服务并使用它们的功能。...
ResultSet rs = stmt.executeQuery("select ename, empno, sal from emp"); // 遍历结果集 while (rs.next()) { String name = rs.getString(1); int number = rs.getInt(2); double salary = rs.getDouble(3...
Windows INI file Commands for accessing Windows INI files. Console Commands related to Windows consoles. Scheduler Commands related to managing scheduled jobs through the task scheduler. ...
在IT领域,特别是针对苹果系统的应用开发中,访问硬件资源是一项关键技能,它涉及到软件与硬件之间的交互,使应用程序能够利用计算机的各种物理组件来实现特定功能。本文将深入探讨苹果系统下应用程序如何访问硬件,...
Programming Windows, Sixth Edition focuses on creating Windows 8 apps accessing the Windows Runtime with XAML and C#. The book also provides C++ code samples. The Sixth Edition is organized in two ...
String sql = "SELECT * FROM Employees WHERE FirstName = ?"; PreparedStatement pstmt = connection.prepareStatement(sql); pstmt.setString(1, "John"); ResultSet rs = pstmt.executeQuery(); ``` #### 创建...
Accessing a static property from XAML 33 Creating a custom markup extension 37 Handling routed events 44 Chapter 2: Resources 51 Introduction 51 Using logical resources 52 Dynamically binding to...
This can prevent legacy DOS applications, executed by the NTVDM of Windows, from accessing some files or directories. Currently the driver does not implement defragging support. So defragmentation ...
"Accessing the Borland Database Engine (BDE) from Visual C++" 主题聚焦于如何在微软的Visual C++环境中利用Borland Database Engine(BDE)来访问数据库。BDE是由Borland公司开发的一种中间件,它为多种编程语言...
rather, it's a book about writing 32-bit Windows applications in C++ using MFC rather than the Windows API as the chief means of accessing the operating system's essential features and services....
首先,让我们理解“Accessing Crystal Reports from Java”的概念。这涉及到通过Java编程语言与Crystal Reports的API交互,使得Java应用程序能够生成、查看和打印由Crystal Reports设计的报表。这通常需要使用...
本系列练习题围绕“Accessing the WAN”(访问广域网)这一主题展开,涵盖了一系列关于网络连接、路由协议、广域网技术等内容,是CCNA4第四学期的重要学习材料。 一、WAN基础知识 WAN(Wide Area Network)广域网是...
WebAssembly: Accessing C and C++ in Web Applications English | MP4 | AVC 1280×720 | AAC 48KHz 2ch | 1h 45m | 213 MB Accelerate web applications with native code using WebAssembly. WebAssembly is a ...
W32waves.pas - Unit for accessing Windows PCM wave file information - by Ulli Conrad. atl_oggvorbis.pas: Audio Tools Library, Class TOggVorbis - for extracting information from Ogg Vorbis file ...
这些是学习长在学校培训的CCNA的资料 ,希望对你们有用,哈
"accessing-and-modifying.zip"这个压缩包可能包含了关于如何使用Python和OpenCV来访问和修改图像数据的相关资料。接下来,我们将深入探讨这两个关键主题。 Python是一种高级编程语言,以其简洁、易读的语法而闻名...
- **网络共享**:利用网络共享技术(如Windows的UNC路径或Linux的NFS)实现跨平台访问。 - **云存储解决方案**:通过云服务提供商(如AWS S3、Google Cloud Storage等)来存储和访问SAS文件。 - **FTP/SFTP**:利用...
标题中的"Accessing Twain 2_huntermog_vb.net_"表明这是一个关于使用VB.NET访问TWAIN接口的示例项目。TWAIN是一种标准的软件接口,允许应用程序(如图像扫描器或相机)与硬件设备(如扫描仪)进行通信。在VB.NET...
Exam 70-516: TS: Accessing Data with Microsoft .NET Framework 4 Exam 70-518: Pro: Designing and Developing Windows Applications Using Microsoft .NET Framework 4 Exam 70-519: Pro: Designing and ...