<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[Linux-Noob Forums - Samba and NFS]]></title>
		<link>https://www.linux-noob.com/forums/</link>
		<description><![CDATA[Linux-Noob Forums - https://www.linux-noob.com/forums]]></description>
		<pubDate>Sun, 10 May 2026 16:52:08 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[That went nowhere, so new strategy...now CIFS mount is saying, "Host is down"]]></title>
			<link>https://www.linux-noob.com/forums/thread-47.html</link>
			<pubDate>Wed, 29 May 2019 21:19:03 +0200</pubDate>
			<dc:creator><![CDATA[<a href="https://www.linux-noob.com/forums/member.php?action=profile&uid=5056">garnern2</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.linux-noob.com/forums/thread-47.html</guid>
			<description><![CDATA[<br />
<br />
	I've changed strategies. Since the permissions issue was obviously too complex to tackle with my limited ability to explain the problem, I decided to simply use my router's Samba hosting and plug the hard drive in there. SUCCESS! I can access the samba share using smbclient from the command line, and I can access it from Gnome in "Files."<br />
<br />
<br />
<br />
<br />
	However, when I try to use CIFS to create a permanent mount to the Samba drive using the EXACT. SAME. INFORMATION. it says, "mount error(112): Host is down."<br />
<br />
<br />
<br />
<br />
	This is the most frustrating thing I've experienced in the world of computing. I just want to share my damn external drive so that I can use Plex/Kodi/etc. to watch my decades of media on my devices in my house. I'm using Ubuntu 18.04. It shouldn't be this complicated. Any help would be greatly appreciated.<br />
<br />
<br />
]]></description>
			<content:encoded><![CDATA[<br />
<br />
	I've changed strategies. Since the permissions issue was obviously too complex to tackle with my limited ability to explain the problem, I decided to simply use my router's Samba hosting and plug the hard drive in there. SUCCESS! I can access the samba share using smbclient from the command line, and I can access it from Gnome in "Files."<br />
<br />
<br />
<br />
<br />
	However, when I try to use CIFS to create a permanent mount to the Samba drive using the EXACT. SAME. INFORMATION. it says, "mount error(112): Host is down."<br />
<br />
<br />
<br />
<br />
	This is the most frustrating thing I've experienced in the world of computing. I just want to share my damn external drive so that I can use Plex/Kodi/etc. to watch my decades of media on my devices in my house. I'm using Ubuntu 18.04. It shouldn't be this complicated. Any help would be greatly appreciated.<br />
<br />
<br />
]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Can see Samba share from external hard drive, but cannot copy files/create folders/etc]]></title>
			<link>https://www.linux-noob.com/forums/thread-48.html</link>
			<pubDate>Tue, 28 May 2019 22:20:20 +0200</pubDate>
			<dc:creator><![CDATA[<a href="https://www.linux-noob.com/forums/member.php?action=profile&uid=5056">garnern2</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.linux-noob.com/forums/thread-48.html</guid>
			<description><![CDATA[<br />
<br />
	I am running Ubuntu 18.04. I'm new to Linux, but I'm pretty good at reading various guides. Unfortunately, I've tried so many solutions to this problem that I'm not even sure where I am in solving the issue at this point. I have successfully setup a Samba share on my Ubuntu machine, but when I open the folder on my Mac, I cannot do anything other than see the folders and open the files. Trying to do otherwise results in an "Operation not permitted" error on OSX. I know this must be a permissions issue, but I have attempted changing ownership and permissions to wide open in an effort to force the ability to add files to the external hard drive on the Ubuntu machine from my MacBook, and I'm having no luck.<br />
<br />
<br />
<br />
<br />
	Like I said...I'm new to Linux, so I don't even know where to begin regarding logs, etc. Any guidance--even if it's "completely remove Samba and start over"--would be appreciated. Please bear with me, as I've explained the issue as much as I currently know how to explain it.<br />
<br />
<br />
]]></description>
			<content:encoded><![CDATA[<br />
<br />
	I am running Ubuntu 18.04. I'm new to Linux, but I'm pretty good at reading various guides. Unfortunately, I've tried so many solutions to this problem that I'm not even sure where I am in solving the issue at this point. I have successfully setup a Samba share on my Ubuntu machine, but when I open the folder on my Mac, I cannot do anything other than see the folders and open the files. Trying to do otherwise results in an "Operation not permitted" error on OSX. I know this must be a permissions issue, but I have attempted changing ownership and permissions to wide open in an effort to force the ability to add files to the external hard drive on the Ubuntu machine from my MacBook, and I'm having no luck.<br />
<br />
<br />
<br />
<br />
	Like I said...I'm new to Linux, so I don't even know where to begin regarding logs, etc. Any guidance--even if it's "completely remove Samba and start over"--would be appreciated. Please bear with me, as I've explained the issue as much as I currently know how to explain it.<br />
<br />
<br />
]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Simple guest read, password writable Samba server for a small network]]></title>
			<link>https://www.linux-noob.com/forums/thread-163.html</link>
			<pubDate>Sat, 05 May 2012 15:09:02 +0200</pubDate>
			<dc:creator><![CDATA[<a href="https://www.linux-noob.com/forums/member.php?action=profile&uid=856">hybrid</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.linux-noob.com/forums/thread-163.html</guid>
			<description><![CDATA[<br />
I use Samba on a CentOS 6 server to share files between Windows, Linux and Mac clients. Guest access is allowed to all folders, but is read only, and there are several Samba accounts for writing files to the shares.<br />
<br />
 <br />
<br />
The purpose of this tutorial is to document, roughly, what my configuration was to set up Samba for sharing a couple of folders on the local network in this way.<br />
<br />
 <br />
<br />
<span style="font-size: 14pt;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Install Samba</span></span><br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># yum install samba<br />
# service smb start<br />
# service nmb start<br />
# chkconfig nmb on<br />
# chkconfig smb on</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
<span style="font-size: 14pt;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Create the sharing directories</span></span><br />
<br />
 <br />
<br />
<span style="font-size: 1pt;" class="mycode_size">(In my actual setup, I have used </span><span style="font-size: 1pt;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">/etc/fstab</span></span><span style="font-size: 1pt;" class="mycode_size"> to mount these directories on separate, large disks, so there's plenty of space. That's beyond the scope of this tutorial, but:</span><br />
<br />
<span style="font-size: 1pt;" class="mycode_size"><span style="font-style: italic;" class="mycode_i">/etc/fstab</span></span><br />
<br />
<span style="font-size: 1pt;" class="mycode_size">UUID=xxxxxxxxx /var/lib/samba/photos   ext3	defaults		1 0</span><br />
<br />
<span style="font-size: 1pt;" class="mycode_size">UUID=xxxxxxxxx /var/lib/samba/sharedfiles ext3	defaults		1 0</span><br />
<br />
<span style="font-size: 1pt;" class="mycode_size">with the real UUIDs substituted in!)</span><br />
<br />
 <br />
<br />
Let's create the two directories where our shared files will be stored:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># mkdir /var/lib/samba/photos<br />
# mkdir /var/lib/samba/sharedfiles</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
<span style="font-weight: bold;" class="mycode_b">Add the users and groups</span><br />
<br />
 <br />
<br />
In order to support this model of guests having read only access, and granting write access only to known users, we need to have some users and groups set up at the Unix level. The users and groups at the Unix level map to some of the Samba users we will create later.<br />
<br />
 <br />
<br />
They are separate users -- having a Samba login and password doesn't mean you have to give the user in question shell access, because they are two separate accounts and can have two separate passwords. We simply use the users, as I said, to 'map' the Samba credentials to the Unix permissions on disk.<br />
<br />
 <br />
<br />
We will also create a group, samba-writers, to allow us to have group write access to the shared folders. I'll add my user account, peter, to this group.<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># groupadd samba-writers<br />
# usermod -a -G samba-writers peter</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Let's set the permissions on our two shared folders for this group:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># chown peter:samba-writers /var/lib/samba/photos<br />
# chown peter:samba-writers /var/lib/samba/sharedfiles<br />
# chmod 775 /var/lib/samba/photos<br />
# chmod 775 /var/lib/samba/sharedfiles</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Mode '775' on a directory allows the user (peter), the group (samba-writers) to write files, and others (guests) to just read.<br />
<br />
 <br />
<br />
Now, let's add the mappings between Samba users and Unix users. Open <span style="font-weight: bold;" class="mycode_b">/etc/samba/smbusers</span> using your favourite text editor. I'll use vim throughout this guide.<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># vim /etc/samba/smbusers<br />
<br />
peter = peter<br />
user1 = user1<br />
user2 = user2</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
The example accounts user1 and user2 will be for our other Samba-enabled accounts.<br />
<br />
 <br />
<br />
Again, we will create Unix shell accounts for user1 and user2, but use different passwords for SMB and their Unix account, and not share the shell password with the users. They only need and want Samba access, so we won't let them log in to the shell.<br />
<br />
 <br />
<br />
First, we'll set my password for Samba. A different password from my shell login password.<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># smbpasswd -a peter</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
('-a' to add the user for the first time. To change it later, just 'smbpasswd peter')<br />
<br />
 <br />
<br />
And let's add the other users.<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># useradd -G samba-writers -s /sbin/nologin user1<br />
# passwd user1<br />
# smbpasswd -a user1</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Notice we set the shell to <span style="font-weight: bold;" class="mycode_b">/sbin/nologin</span>. These users, as I've said several times already, we are not allowing shell access.<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># useradd -G samba-writers -s /sbin/nologin user2<br />
# passwd user2<br />
# smbpasswd -a user2</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
<span style="font-size: 14pt;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Set up the configuration files</span></span><br />
<br />
 <br />
<br />
Now that our users are ready for Samba, we need to set up the Samba configuration to share the two folders we've created, and allow the right level of access to users, as well as to guests.<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># vim /etc/samba/smb.conf</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
The default CentOS configuration file has quite a lot already in it. Look for the headings, and make these changes:<br />
<br />
 <br />
<br />
Under <span style="font-style: italic;" class="mycode_i">Network Related Options</span>:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>&nbsp;&nbsp;&nbsp;&nbsp;workgroup = WORKGROUP<br />
&nbsp;&nbsp;&nbsp;&nbsp;server string = Server Shared Files<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;netbios name = MACHINENAME<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;hosts allow = 127. 192.168.0.<br />
&nbsp;&nbsp;&nbsp;&nbsp;hosts deny = ALL</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Set WORKGROUP to the workgroup name, if it's configured differently on your Windows clients. (On some older Windows versions, it may need to be MSHOME.)<br />
<br />
 <br />
<br />
Set MACHINENAME to the name you want the Samba server to have.<br />
<br />
 <br />
<br />
Finally, we use the 'hosts allow' and 'hosts deny' directives to force Samba only to serve to clients on the local network. In this case, 192.168.0.1 -- 192.168.0.254. You may want to change this to your IP addressing scheme in your network, or remove it to not restrict access to the local network.<br />
<br />
 <br />
<br />
Under <span style="font-style: italic;" class="mycode_i">Standalone Server Options</span>:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>security = user<br />
passdb backend = tdbsam<br />
map to guest = Bad Password<br />
<br />
domain master = yes</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Under <span style="font-style: italic;" class="mycode_i">Browser Control Options</span>:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>local master = yes<br />
os level = 99<br />
preferred master = yes</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
These directives aren't strictly necessary -- in fact, they may cause conflict if you're doing other Windows networking things on the same workgroup. 'os level = 99', combined with the other options, will force this machine to be the 'local master browser' (LMB) and the 'domain master browser' (DMB).<br />
<br />
 <br />
<br />
Whichever machine on the network has these roles is responsible for keeping a list of the other machines on the network. Clients use this list to look for other machines that have shared folders available. I've found that forcing my Samba server to be the LMB and DMB, as well as using it as a WINS server, speeds up the time it takes Windows to 'search' for other machines on the network by many many times. (Remember opening 'My Network Places' and clicking 'Show workgroup computers' only to have to wait 15 seconds while Explorer locks up? This avoids that.)<br />
<br />
 <br />
<br />
In more complex scenarios, you might not want to enable this to avoid conflict. For our small network scenario, it's a useful speed bonus and causes no problems.<br />
<br />
 <br />
<br />
Under <span style="font-style: italic;" class="mycode_i">Name Resolution</span>:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>wins support = yes</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Samba becomes a WINS server, which again can help speed things up -- it means you can address other sharing computers by name without waiting for long periods for NetBIOS to resolve the name. (<a href="http://www.techrepublic.com/article/how-netbios-name-resolution-really-works/5034239" target="_blank" rel="noopener" class="mycode_url">Some more tech info about this</a>, if you're interested.)<br />
<br />
 <br />
<br />
You may want to configure your Windows machines' 'WINS server' IP address to point to your Samba server to get this benefit. (You might need to configure this in your router's DHCP settings for it to stick to all of them.)<br />
<br />
 <br />
<br />
Finally, at the bottom of the file, we add our shares:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>[sharedfiles]<br />
comment = Shared files for the network<br />
path = /var/lib/samba/sharedstuff<br />
guest ok = yes<br />
writable = no<br />
create mask = 0664<br />
directory mask = 0775<br />
force group = samba-writers<br />
write list = @samba-writers<br />
<br />
[Photos]<br />
comment = Shared photos<br />
path = /var/lib/samba/photos<br />
guest ok = yes<br />
writable = no<br />
create mask = 0664<br />
directory mask = 0775<br />
force group = samba-writers<br />
write list = @samba-writers</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Each folder has its own name in brackets, followed by the options for that folder.<br />
<br />
 <br />
<br />
We use 'guest ok = yes' to allow guests, but 'writable = no' to make them read only. Anyone in the 'write list' (anyone in the group samba-writers) can write.<br />
<br />
 <br />
<br />
There are also other settings to set the default permisisons on files ('create mask = 0664', owner read+write, group read+write, others read only) and folders ('directory mask = 0775', owner read+write+enter, group read+write+enter, others read+enter).<br />
<br />
 <br />
<br />
Once we're done, save that file and quit the editor, and reload Samba:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># service smb restart<br />
# service nmb restart</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Just make sure your firewall is letting Samba through:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># system-config-firewall-tui</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
And we're ready to test!<br />
<br />
 <br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: 14pt;" class="mycode_size">Accessing the shares</span></span><br />
<br />
 <br />
<br />
<span style="font-size: 8pt;" class="mycode_size">Linux</span><br />
<br />
 <br />
<br />
Without logging in, we can access the shares by going to <span style="font-weight: bold;" class="mycode_b">smb://machinename</span> (or <span style="font-weight: bold;" class="mycode_b">smb://192.168.0.whatever</span>) in the address bar of the file manager. This works in most file managers.<br />
<br />
 <br />
<br />
To log in and have write access, you may have luck with a 'Connect to Server' window that lets you type in the username and password, like this one in the Ubuntu 12.04 desktop's File menu.<br />
<br />
 <br />
<br />
&lt;a class="ipsAttachLink ipsAttachLink_image" href="&lt;fileStore.core_Attachment&gt;/monthly_05_2012/post-1019-0-13574400-1336222085.png" data-fileid="1370"&gt;[img]&lt;fileStore.core_Attachment&gt;/monthly_05_2012/post-1019-0-13574400-1336222085_thumb.png[/img]&lt;/a&gt;<br />
<br />
 <br />
<br />
I've had problems with write access this way, though, so you may need to use something like <a href="https://help.ubuntu.com/community/MountWindowsSharesPermanently" target="_blank" rel="noopener" class="mycode_url">smbfs to mount the share permanently</a>.<br />
<br />
 <br />
<br />
<span style="font-size: 8pt;" class="mycode_size">Mac</span><br />
<br />
 <br />
<br />
Under recent versions of Mac OS X, the server should appear right away in the Finder's sidebar. Simply click the server name to see the shares and browse them.<br />
<br />
 <br />
<br />
For write access, simply click the 'Connect As' button in the window and enter your username and password for SMB that you set up earlier.<br />
<br />
 <br />
<br />
&lt;a class="ipsAttachLink ipsAttachLink_image" href="&lt;fileStore.core_Attachment&gt;/monthly_05_2012/post-1019-0-30053800-1336222587.png" data-fileid="1371"&gt;[img]&lt;fileStore.core_Attachment&gt;/monthly_05_2012/post-1019-0-30053800-1336222587_thumb.png[/img]&lt;/a&gt;<br />
<br />
 <br />
<br />
&lt;a class="ipsAttachLink ipsAttachLink_image" href="&lt;fileStore.core_Attachment&gt;/monthly_05_2012/post-1019-0-26884900-1336222692.png" data-fileid="1372"&gt;[img]&lt;fileStore.core_Attachment&gt;/monthly_05_2012/post-1019-0-26884900-1336222692_thumb.png[/img]&lt;/a&gt;<br />
<br />
 <br />
<br />
If you don't see the server in the sidebar, (Lion is more temperamental than Snow Leopard was about this), press ⌘K to bring up the 'Connect to Server' dialogue. Type <span style="font-weight: bold;" class="mycode_b">cifs://machinename</span> or <span style="font-weight: bold;" class="mycode_b">cifs://192.168.0.whatever</span> and click OK to connect.<br />
<br />
 <br />
<br />
<span style="font-size: 8pt;" class="mycode_size">Windows</span><br />
<br />
 <br />
<br />
The server should show up in 'Network' for guest access.<br />
<br />
 <br />
<br />
The best way to log in and have write access, I have found, is to map the shared folder as a network drive. In an Explorer window, click 'Map Network Drive' in the toolbar (it's under the Tools menu on Windows XP and earlier).<br />
<br />
 <br />
<br />
Choose a drive letter, enter <span style="font-weight: bold;" class="mycode_b">\\machinename\foldername</span> as the path, and make sure you tick to 'Connect using different credentials'.<br />
<br />
 <br />
<br />
&lt;a class="ipsAttachLink ipsAttachLink_image" href="&lt;fileStore.core_Attachment&gt;/monthly_05_2012/post-1019-0-89993900-1336223125.png" data-fileid="1373"&gt;[img]&lt;fileStore.core_Attachment&gt;/monthly_05_2012/post-1019-0-89993900-1336223125_thumb.png[/img]&lt;/a&gt;<br />
<br />
 <br />
<br />
You'll then be asked for the username and password, which is the SMB password you set for the account earlier.<br />
<br />
 <br />
<br />
&lt;a class="ipsAttachLink ipsAttachLink_image" href="&lt;fileStore.core_Attachment&gt;/monthly_05_2012/post-1019-0-73397800-1336223138.png" data-fileid="1374"&gt;[img]&lt;fileStore.core_Attachment&gt;/monthly_05_2012/post-1019-0-73397800-1336223138_thumb.png[/img]&lt;/a&gt;<br />
<br />
<br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.linux-noob.com/forums/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=1035" target="_blank" title="">SMB connect.png</a> (Size: 35.98 KB / Downloads: 495)
<!-- end: postbit_attachments_attachment --><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.linux-noob.com/forums/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=1036" target="_blank" title="">connect as button.png</a> (Size: 46.24 KB / Downloads: 483)
<!-- end: postbit_attachments_attachment --><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.linux-noob.com/forums/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=1037" target="_blank" title="">password entry.png</a> (Size: 34.96 KB / Downloads: 495)
<!-- end: postbit_attachments_attachment --><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.linux-noob.com/forums/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=1038" target="_blank" title="">win_map.png</a> (Size: 52.59 KB / Downloads: 478)
<!-- end: postbit_attachments_attachment --><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.linux-noob.com/forums/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=1039" target="_blank" title="">win_pw.png</a> (Size: 29.52 KB / Downloads: 491)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<br />
I use Samba on a CentOS 6 server to share files between Windows, Linux and Mac clients. Guest access is allowed to all folders, but is read only, and there are several Samba accounts for writing files to the shares.<br />
<br />
 <br />
<br />
The purpose of this tutorial is to document, roughly, what my configuration was to set up Samba for sharing a couple of folders on the local network in this way.<br />
<br />
 <br />
<br />
<span style="font-size: 14pt;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Install Samba</span></span><br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># yum install samba<br />
# service smb start<br />
# service nmb start<br />
# chkconfig nmb on<br />
# chkconfig smb on</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
<span style="font-size: 14pt;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Create the sharing directories</span></span><br />
<br />
 <br />
<br />
<span style="font-size: 1pt;" class="mycode_size">(In my actual setup, I have used </span><span style="font-size: 1pt;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">/etc/fstab</span></span><span style="font-size: 1pt;" class="mycode_size"> to mount these directories on separate, large disks, so there's plenty of space. That's beyond the scope of this tutorial, but:</span><br />
<br />
<span style="font-size: 1pt;" class="mycode_size"><span style="font-style: italic;" class="mycode_i">/etc/fstab</span></span><br />
<br />
<span style="font-size: 1pt;" class="mycode_size">UUID=xxxxxxxxx /var/lib/samba/photos   ext3	defaults		1 0</span><br />
<br />
<span style="font-size: 1pt;" class="mycode_size">UUID=xxxxxxxxx /var/lib/samba/sharedfiles ext3	defaults		1 0</span><br />
<br />
<span style="font-size: 1pt;" class="mycode_size">with the real UUIDs substituted in!)</span><br />
<br />
 <br />
<br />
Let's create the two directories where our shared files will be stored:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># mkdir /var/lib/samba/photos<br />
# mkdir /var/lib/samba/sharedfiles</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
<span style="font-weight: bold;" class="mycode_b">Add the users and groups</span><br />
<br />
 <br />
<br />
In order to support this model of guests having read only access, and granting write access only to known users, we need to have some users and groups set up at the Unix level. The users and groups at the Unix level map to some of the Samba users we will create later.<br />
<br />
 <br />
<br />
They are separate users -- having a Samba login and password doesn't mean you have to give the user in question shell access, because they are two separate accounts and can have two separate passwords. We simply use the users, as I said, to 'map' the Samba credentials to the Unix permissions on disk.<br />
<br />
 <br />
<br />
We will also create a group, samba-writers, to allow us to have group write access to the shared folders. I'll add my user account, peter, to this group.<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># groupadd samba-writers<br />
# usermod -a -G samba-writers peter</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Let's set the permissions on our two shared folders for this group:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># chown peter:samba-writers /var/lib/samba/photos<br />
# chown peter:samba-writers /var/lib/samba/sharedfiles<br />
# chmod 775 /var/lib/samba/photos<br />
# chmod 775 /var/lib/samba/sharedfiles</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Mode '775' on a directory allows the user (peter), the group (samba-writers) to write files, and others (guests) to just read.<br />
<br />
 <br />
<br />
Now, let's add the mappings between Samba users and Unix users. Open <span style="font-weight: bold;" class="mycode_b">/etc/samba/smbusers</span> using your favourite text editor. I'll use vim throughout this guide.<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># vim /etc/samba/smbusers<br />
<br />
peter = peter<br />
user1 = user1<br />
user2 = user2</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
The example accounts user1 and user2 will be for our other Samba-enabled accounts.<br />
<br />
 <br />
<br />
Again, we will create Unix shell accounts for user1 and user2, but use different passwords for SMB and their Unix account, and not share the shell password with the users. They only need and want Samba access, so we won't let them log in to the shell.<br />
<br />
 <br />
<br />
First, we'll set my password for Samba. A different password from my shell login password.<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># smbpasswd -a peter</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
('-a' to add the user for the first time. To change it later, just 'smbpasswd peter')<br />
<br />
 <br />
<br />
And let's add the other users.<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># useradd -G samba-writers -s /sbin/nologin user1<br />
# passwd user1<br />
# smbpasswd -a user1</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Notice we set the shell to <span style="font-weight: bold;" class="mycode_b">/sbin/nologin</span>. These users, as I've said several times already, we are not allowing shell access.<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># useradd -G samba-writers -s /sbin/nologin user2<br />
# passwd user2<br />
# smbpasswd -a user2</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
<span style="font-size: 14pt;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Set up the configuration files</span></span><br />
<br />
 <br />
<br />
Now that our users are ready for Samba, we need to set up the Samba configuration to share the two folders we've created, and allow the right level of access to users, as well as to guests.<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># vim /etc/samba/smb.conf</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
The default CentOS configuration file has quite a lot already in it. Look for the headings, and make these changes:<br />
<br />
 <br />
<br />
Under <span style="font-style: italic;" class="mycode_i">Network Related Options</span>:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>&nbsp;&nbsp;&nbsp;&nbsp;workgroup = WORKGROUP<br />
&nbsp;&nbsp;&nbsp;&nbsp;server string = Server Shared Files<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;netbios name = MACHINENAME<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;hosts allow = 127. 192.168.0.<br />
&nbsp;&nbsp;&nbsp;&nbsp;hosts deny = ALL</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Set WORKGROUP to the workgroup name, if it's configured differently on your Windows clients. (On some older Windows versions, it may need to be MSHOME.)<br />
<br />
 <br />
<br />
Set MACHINENAME to the name you want the Samba server to have.<br />
<br />
 <br />
<br />
Finally, we use the 'hosts allow' and 'hosts deny' directives to force Samba only to serve to clients on the local network. In this case, 192.168.0.1 -- 192.168.0.254. You may want to change this to your IP addressing scheme in your network, or remove it to not restrict access to the local network.<br />
<br />
 <br />
<br />
Under <span style="font-style: italic;" class="mycode_i">Standalone Server Options</span>:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>security = user<br />
passdb backend = tdbsam<br />
map to guest = Bad Password<br />
<br />
domain master = yes</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Under <span style="font-style: italic;" class="mycode_i">Browser Control Options</span>:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>local master = yes<br />
os level = 99<br />
preferred master = yes</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
These directives aren't strictly necessary -- in fact, they may cause conflict if you're doing other Windows networking things on the same workgroup. 'os level = 99', combined with the other options, will force this machine to be the 'local master browser' (LMB) and the 'domain master browser' (DMB).<br />
<br />
 <br />
<br />
Whichever machine on the network has these roles is responsible for keeping a list of the other machines on the network. Clients use this list to look for other machines that have shared folders available. I've found that forcing my Samba server to be the LMB and DMB, as well as using it as a WINS server, speeds up the time it takes Windows to 'search' for other machines on the network by many many times. (Remember opening 'My Network Places' and clicking 'Show workgroup computers' only to have to wait 15 seconds while Explorer locks up? This avoids that.)<br />
<br />
 <br />
<br />
In more complex scenarios, you might not want to enable this to avoid conflict. For our small network scenario, it's a useful speed bonus and causes no problems.<br />
<br />
 <br />
<br />
Under <span style="font-style: italic;" class="mycode_i">Name Resolution</span>:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>wins support = yes</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Samba becomes a WINS server, which again can help speed things up -- it means you can address other sharing computers by name without waiting for long periods for NetBIOS to resolve the name. (<a href="http://www.techrepublic.com/article/how-netbios-name-resolution-really-works/5034239" target="_blank" rel="noopener" class="mycode_url">Some more tech info about this</a>, if you're interested.)<br />
<br />
 <br />
<br />
You may want to configure your Windows machines' 'WINS server' IP address to point to your Samba server to get this benefit. (You might need to configure this in your router's DHCP settings for it to stick to all of them.)<br />
<br />
 <br />
<br />
Finally, at the bottom of the file, we add our shares:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>[sharedfiles]<br />
comment = Shared files for the network<br />
path = /var/lib/samba/sharedstuff<br />
guest ok = yes<br />
writable = no<br />
create mask = 0664<br />
directory mask = 0775<br />
force group = samba-writers<br />
write list = @samba-writers<br />
<br />
[Photos]<br />
comment = Shared photos<br />
path = /var/lib/samba/photos<br />
guest ok = yes<br />
writable = no<br />
create mask = 0664<br />
directory mask = 0775<br />
force group = samba-writers<br />
write list = @samba-writers</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Each folder has its own name in brackets, followed by the options for that folder.<br />
<br />
 <br />
<br />
We use 'guest ok = yes' to allow guests, but 'writable = no' to make them read only. Anyone in the 'write list' (anyone in the group samba-writers) can write.<br />
<br />
 <br />
<br />
There are also other settings to set the default permisisons on files ('create mask = 0664', owner read+write, group read+write, others read only) and folders ('directory mask = 0775', owner read+write+enter, group read+write+enter, others read+enter).<br />
<br />
 <br />
<br />
Once we're done, save that file and quit the editor, and reload Samba:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># service smb restart<br />
# service nmb restart</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Just make sure your firewall is letting Samba through:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># system-config-firewall-tui</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
And we're ready to test!<br />
<br />
 <br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: 14pt;" class="mycode_size">Accessing the shares</span></span><br />
<br />
 <br />
<br />
<span style="font-size: 8pt;" class="mycode_size">Linux</span><br />
<br />
 <br />
<br />
Without logging in, we can access the shares by going to <span style="font-weight: bold;" class="mycode_b">smb://machinename</span> (or <span style="font-weight: bold;" class="mycode_b">smb://192.168.0.whatever</span>) in the address bar of the file manager. This works in most file managers.<br />
<br />
 <br />
<br />
To log in and have write access, you may have luck with a 'Connect to Server' window that lets you type in the username and password, like this one in the Ubuntu 12.04 desktop's File menu.<br />
<br />
 <br />
<br />
&lt;a class="ipsAttachLink ipsAttachLink_image" href="&lt;fileStore.core_Attachment&gt;/monthly_05_2012/post-1019-0-13574400-1336222085.png" data-fileid="1370"&gt;[img]&lt;fileStore.core_Attachment&gt;/monthly_05_2012/post-1019-0-13574400-1336222085_thumb.png[/img]&lt;/a&gt;<br />
<br />
 <br />
<br />
I've had problems with write access this way, though, so you may need to use something like <a href="https://help.ubuntu.com/community/MountWindowsSharesPermanently" target="_blank" rel="noopener" class="mycode_url">smbfs to mount the share permanently</a>.<br />
<br />
 <br />
<br />
<span style="font-size: 8pt;" class="mycode_size">Mac</span><br />
<br />
 <br />
<br />
Under recent versions of Mac OS X, the server should appear right away in the Finder's sidebar. Simply click the server name to see the shares and browse them.<br />
<br />
 <br />
<br />
For write access, simply click the 'Connect As' button in the window and enter your username and password for SMB that you set up earlier.<br />
<br />
 <br />
<br />
&lt;a class="ipsAttachLink ipsAttachLink_image" href="&lt;fileStore.core_Attachment&gt;/monthly_05_2012/post-1019-0-30053800-1336222587.png" data-fileid="1371"&gt;[img]&lt;fileStore.core_Attachment&gt;/monthly_05_2012/post-1019-0-30053800-1336222587_thumb.png[/img]&lt;/a&gt;<br />
<br />
 <br />
<br />
&lt;a class="ipsAttachLink ipsAttachLink_image" href="&lt;fileStore.core_Attachment&gt;/monthly_05_2012/post-1019-0-26884900-1336222692.png" data-fileid="1372"&gt;[img]&lt;fileStore.core_Attachment&gt;/monthly_05_2012/post-1019-0-26884900-1336222692_thumb.png[/img]&lt;/a&gt;<br />
<br />
 <br />
<br />
If you don't see the server in the sidebar, (Lion is more temperamental than Snow Leopard was about this), press ⌘K to bring up the 'Connect to Server' dialogue. Type <span style="font-weight: bold;" class="mycode_b">cifs://machinename</span> or <span style="font-weight: bold;" class="mycode_b">cifs://192.168.0.whatever</span> and click OK to connect.<br />
<br />
 <br />
<br />
<span style="font-size: 8pt;" class="mycode_size">Windows</span><br />
<br />
 <br />
<br />
The server should show up in 'Network' for guest access.<br />
<br />
 <br />
<br />
The best way to log in and have write access, I have found, is to map the shared folder as a network drive. In an Explorer window, click 'Map Network Drive' in the toolbar (it's under the Tools menu on Windows XP and earlier).<br />
<br />
 <br />
<br />
Choose a drive letter, enter <span style="font-weight: bold;" class="mycode_b">\\machinename\foldername</span> as the path, and make sure you tick to 'Connect using different credentials'.<br />
<br />
 <br />
<br />
&lt;a class="ipsAttachLink ipsAttachLink_image" href="&lt;fileStore.core_Attachment&gt;/monthly_05_2012/post-1019-0-89993900-1336223125.png" data-fileid="1373"&gt;[img]&lt;fileStore.core_Attachment&gt;/monthly_05_2012/post-1019-0-89993900-1336223125_thumb.png[/img]&lt;/a&gt;<br />
<br />
 <br />
<br />
You'll then be asked for the username and password, which is the SMB password you set for the account earlier.<br />
<br />
 <br />
<br />
&lt;a class="ipsAttachLink ipsAttachLink_image" href="&lt;fileStore.core_Attachment&gt;/monthly_05_2012/post-1019-0-73397800-1336223138.png" data-fileid="1374"&gt;[img]&lt;fileStore.core_Attachment&gt;/monthly_05_2012/post-1019-0-73397800-1336223138_thumb.png[/img]&lt;/a&gt;<br />
<br />
<br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.linux-noob.com/forums/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=1035" target="_blank" title="">SMB connect.png</a> (Size: 35.98 KB / Downloads: 495)
<!-- end: postbit_attachments_attachment --><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.linux-noob.com/forums/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=1036" target="_blank" title="">connect as button.png</a> (Size: 46.24 KB / Downloads: 483)
<!-- end: postbit_attachments_attachment --><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.linux-noob.com/forums/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=1037" target="_blank" title="">password entry.png</a> (Size: 34.96 KB / Downloads: 495)
<!-- end: postbit_attachments_attachment --><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.linux-noob.com/forums/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=1038" target="_blank" title="">win_map.png</a> (Size: 52.59 KB / Downloads: 478)
<!-- end: postbit_attachments_attachment --><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.linux-noob.com/forums/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=1039" target="_blank" title="">win_pw.png</a> (Size: 29.52 KB / Downloads: 491)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[how to optimize samba performance?]]></title>
			<link>https://www.linux-noob.com/forums/thread-398.html</link>
			<pubDate>Tue, 04 Jan 2011 05:21:32 +0100</pubDate>
			<dc:creator><![CDATA[<a href="https://www.linux-noob.com/forums/member.php?action=profile&uid=1611">adam2k</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.linux-noob.com/forums/thread-398.html</guid>
			<description><![CDATA[<br />
Hello,<br />
<br />
 <br />
<br />
I have installed a linux server, centos gui server with Raid1, his role will be only a file server. I installed samba and configured it. The file system is EXT3. the server got 4 gigs of memory.<br />
<br />
There is a program in windows that writes files to the share.<br />
<br />
 <br />
<br />
I searched and i found that there is some commands that you add and they boost the performance. This is what i added to smb.conf <br />
<br />
 <br />
<br />
refresh = 1<br />
<br />
socket options = TCP_NODELAY IPTOS_LOWDELAY<br />
<br />
read raw = No<br />
<br />
write raw = Yes<br />
<br />
max xmit = 131072<br />
<br />
use sendfile = Yes<br />
<br />
dead time = 15<br />
<br />
getwd cache = Yes<br />
<br />
otlocks = No<br />
<br />
strict allocate = yes<br />
<br />
 <br />
<br />
 <br />
<br />
 <br />
<br />
I got complains that the writes are not fast enough. Before me another IT guy configured the file server and it was faster, what he told my customer that he changed some command of cache but i dont know exactly what he did. I have been asked to find how to boost the performance. <br />
<br />
 <br />
<br />
Please give me more commands to try to boost the performance of Samba or tell me if i need to change anything..<br />
<br />
 <br />
<br />
Thanks A Lot.<br />
<br />
]]></description>
			<content:encoded><![CDATA[<br />
Hello,<br />
<br />
 <br />
<br />
I have installed a linux server, centos gui server with Raid1, his role will be only a file server. I installed samba and configured it. The file system is EXT3. the server got 4 gigs of memory.<br />
<br />
There is a program in windows that writes files to the share.<br />
<br />
 <br />
<br />
I searched and i found that there is some commands that you add and they boost the performance. This is what i added to smb.conf <br />
<br />
 <br />
<br />
refresh = 1<br />
<br />
socket options = TCP_NODELAY IPTOS_LOWDELAY<br />
<br />
read raw = No<br />
<br />
write raw = Yes<br />
<br />
max xmit = 131072<br />
<br />
use sendfile = Yes<br />
<br />
dead time = 15<br />
<br />
getwd cache = Yes<br />
<br />
otlocks = No<br />
<br />
strict allocate = yes<br />
<br />
 <br />
<br />
 <br />
<br />
 <br />
<br />
I got complains that the writes are not fast enough. Before me another IT guy configured the file server and it was faster, what he told my customer that he changed some command of cache but i dont know exactly what he did. I have been asked to find how to boost the performance. <br />
<br />
 <br />
<br />
Please give me more commands to try to boost the performance of Samba or tell me if i need to change anything..<br />
<br />
 <br />
<br />
Thanks A Lot.<br />
<br />
]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[USB drive sharing]]></title>
			<link>https://www.linux-noob.com/forums/thread-595.html</link>
			<pubDate>Mon, 10 Aug 2009 22:06:53 +0200</pubDate>
			<dc:creator><![CDATA[<a href="https://www.linux-noob.com/forums/member.php?action=profile&uid=3400">wheybags</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.linux-noob.com/forums/thread-595.html</guid>
			<description><![CDATA[<br />
Hey,<br />
<br />
I use aserver computer to share a usb drive and printer so that me and my mother can both use them.<br />
<br />
It was running xp, but in the interest of stablity, I decided to switch it to linux.<br />
<br />
The problem is this:<br />
<br />
When I share the drive with samba, it works fine and all, but when I reboot, the share is lost.<br />
<br />
I had this problem in xp, but I solved it by mounting the drive to a folder on my system drive.<br />
<br />
However, I am noob @ linux, so I don't know how to overcome this issue in a foreign os.<br />
<br />
Tyvm, wheybags<br />
<br />
 <br />
<br />
P.S: Running ubuntu.<br />
<br />
]]></description>
			<content:encoded><![CDATA[<br />
Hey,<br />
<br />
I use aserver computer to share a usb drive and printer so that me and my mother can both use them.<br />
<br />
It was running xp, but in the interest of stablity, I decided to switch it to linux.<br />
<br />
The problem is this:<br />
<br />
When I share the drive with samba, it works fine and all, but when I reboot, the share is lost.<br />
<br />
I had this problem in xp, but I solved it by mounting the drive to a folder on my system drive.<br />
<br />
However, I am noob @ linux, so I don't know how to overcome this issue in a foreign os.<br />
<br />
Tyvm, wheybags<br />
<br />
 <br />
<br />
P.S: Running ubuntu.<br />
<br />
]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Samba Problem.]]></title>
			<link>https://www.linux-noob.com/forums/thread-1808.html</link>
			<pubDate>Fri, 22 Sep 2006 07:41:13 +0200</pubDate>
			<dc:creator><![CDATA[<a href="https://www.linux-noob.com/forums/member.php?action=profile&uid=1424">munyit</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.linux-noob.com/forums/thread-1808.html</guid>
			<description><![CDATA[<br />
I install samba 3.0.23 in fedora core 4,<br />
<br />
I've finish configuring samba, I can access the samba server from any computer(windows xp pro) in my network, <br />
<br />
The problem is, i cannot access my shared folder.<br />
<br />
This is my smb.conf file<br />
<br />
        [shared]<br />
<br />
	comment = shared document<br />
<br />
	path = /shared<br />
<br />
	valid users = lerry<br />
<br />
        browsable = yes<br />
<br />
 <br />
<br />
I already create lerry account in my linux mechine using these command<br />
<br />
 <br />
<br />
       [root@Testing ~]# useradd lerry<br />
<br />
       [root@Testing ~]# passwd lerry<br />
<br />
       New UNIX password<img src="https://www.linux-noob.com/forums/images/smilies/sad.png" alt="Sad" title="Sad" class="smilie smilie_8" />lerry)<br />
<br />
       Retype new UNIX password<img src="https://www.linux-noob.com/forums/images/smilies/sad.png" alt="Sad" title="Sad" class="smilie smilie_8" />lerry)<br />
<br />
       passwd: all authentication tokens updated successfully.<br />
<br />
       [root@Testing ~]# smbpasswd lerry<br />
<br />
       New SMB password<img src="https://www.linux-noob.com/forums/images/smilies/sad.png" alt="Sad" title="Sad" class="smilie smilie_8" />lerry)<br />
<br />
       Retype new SMB password<img src="https://www.linux-noob.com/forums/images/smilies/sad.png" alt="Sad" title="Sad" class="smilie smilie_8" />lerry)<br />
<br />
       [root@Testing ~]#<br />
<br />
 <br />
<br />
Then I try to access shared folder and it ask for username and password,<br />
<br />
I entered  <br />
<br />
                username:lerry<br />
<br />
                password:lerry<br />
<br />
but still cannot access the file, <br />
<br />
 <br />
<br />
]]></description>
			<content:encoded><![CDATA[<br />
I install samba 3.0.23 in fedora core 4,<br />
<br />
I've finish configuring samba, I can access the samba server from any computer(windows xp pro) in my network, <br />
<br />
The problem is, i cannot access my shared folder.<br />
<br />
This is my smb.conf file<br />
<br />
        [shared]<br />
<br />
	comment = shared document<br />
<br />
	path = /shared<br />
<br />
	valid users = lerry<br />
<br />
        browsable = yes<br />
<br />
 <br />
<br />
I already create lerry account in my linux mechine using these command<br />
<br />
 <br />
<br />
       [root@Testing ~]# useradd lerry<br />
<br />
       [root@Testing ~]# passwd lerry<br />
<br />
       New UNIX password<img src="https://www.linux-noob.com/forums/images/smilies/sad.png" alt="Sad" title="Sad" class="smilie smilie_8" />lerry)<br />
<br />
       Retype new UNIX password<img src="https://www.linux-noob.com/forums/images/smilies/sad.png" alt="Sad" title="Sad" class="smilie smilie_8" />lerry)<br />
<br />
       passwd: all authentication tokens updated successfully.<br />
<br />
       [root@Testing ~]# smbpasswd lerry<br />
<br />
       New SMB password<img src="https://www.linux-noob.com/forums/images/smilies/sad.png" alt="Sad" title="Sad" class="smilie smilie_8" />lerry)<br />
<br />
       Retype new SMB password<img src="https://www.linux-noob.com/forums/images/smilies/sad.png" alt="Sad" title="Sad" class="smilie smilie_8" />lerry)<br />
<br />
       [root@Testing ~]#<br />
<br />
 <br />
<br />
Then I try to access shared folder and it ask for username and password,<br />
<br />
I entered  <br />
<br />
                username:lerry<br />
<br />
                password:lerry<br />
<br />
but still cannot access the file, <br />
<br />
 <br />
<br />
]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[nfs sharing a usb drive?]]></title>
			<link>https://www.linux-noob.com/forums/thread-2265.html</link>
			<pubDate>Sun, 08 Jan 2006 01:52:09 +0100</pubDate>
			<dc:creator><![CDATA[<a href="https://www.linux-noob.com/forums/member.php?action=profile&uid=1051">dspln</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.linux-noob.com/forums/thread-2265.html</guid>
			<description><![CDATA[<br />
ComputerA has a usb drive /dev/sdc1 - either fat32 or ntfs.<br />
<br />
 <br />
<br />
I mount it as <br />
<br />
/dev/sdc1 on /ext/c1 type ntfs (rw,nosuid,nodev,umask=000)<br />
<br />
 <br />
<br />
all user on ComputerA can access it.<br />
<br />
 <br />
<br />
My /etc/exports has:<br />
<br />
/ext 192.168.0.0/24(async,no_subtree_check,rw)<br />
<br />
 <br />
<br />
ComputerB has mounted:<br />
<br />
ComputerA:/ext on /ext type nfs (rw,nosuid,nodev,addr=192.168.0.7)<br />
<br />
 <br />
<br />
no one on B can see files in /ext/c1 - it is like nfs isn't aware that a drive is mounted on 'c1'.<br />
<br />
 <br />
<br />
How do I provide nfs access to these usb/firewire drives?<br />
<br />
 <br />
<br />
The man page for <span style="font-weight: bold;" class="mycode_b">exports</span> mentions the <span style="font-style: italic;" class="mycode_i">nohide</span> option, which makes it work for one client - but this did not work for me.  <br />
<br />
I guess I'll try a share for each drive<br />
<br />
 <br />
<br />
I figured nfs would abstract the file system types out of it.  Maybe samba is a better choice?<br />
<br />
]]></description>
			<content:encoded><![CDATA[<br />
ComputerA has a usb drive /dev/sdc1 - either fat32 or ntfs.<br />
<br />
 <br />
<br />
I mount it as <br />
<br />
/dev/sdc1 on /ext/c1 type ntfs (rw,nosuid,nodev,umask=000)<br />
<br />
 <br />
<br />
all user on ComputerA can access it.<br />
<br />
 <br />
<br />
My /etc/exports has:<br />
<br />
/ext 192.168.0.0/24(async,no_subtree_check,rw)<br />
<br />
 <br />
<br />
ComputerB has mounted:<br />
<br />
ComputerA:/ext on /ext type nfs (rw,nosuid,nodev,addr=192.168.0.7)<br />
<br />
 <br />
<br />
no one on B can see files in /ext/c1 - it is like nfs isn't aware that a drive is mounted on 'c1'.<br />
<br />
 <br />
<br />
How do I provide nfs access to these usb/firewire drives?<br />
<br />
 <br />
<br />
The man page for <span style="font-weight: bold;" class="mycode_b">exports</span> mentions the <span style="font-style: italic;" class="mycode_i">nohide</span> option, which makes it work for one client - but this did not work for me.  <br />
<br />
I guess I'll try a share for each drive<br />
<br />
 <br />
<br />
I figured nfs would abstract the file system types out of it.  Maybe samba is a better choice?<br />
<br />
]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Windows 2003 Domain]]></title>
			<link>https://www.linux-noob.com/forums/thread-2282.html</link>
			<pubDate>Fri, 23 Dec 2005 14:38:54 +0100</pubDate>
			<dc:creator><![CDATA[<a href="https://www.linux-noob.com/forums/member.php?action=profile&uid=1063">GBKevin</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.linux-noob.com/forums/thread-2282.html</guid>
			<description><![CDATA[<br />
This is how I was able to configure Suse 10.0 to authenticate on a Windows 2003 Active Directory Server.  I do not know if it will work on previous versions of Windows or with previous versions of Suse Linux.  <br />
<br />
 <br />
<br />
Notes:<br />
<br />
 <br />
<br />
1.Any text that reads domain.internal (lower case) you will replace with your domain.<br />
<br />
2.Any text that reads DOMAIN.INTERNAL (upper case) you will replace with your domain in upper case.<br />
<br />
3.Any text that reads DOMAIN (upper case) you will replace with your domain (no .internal)<br />
<br />
4.The NetBios name is the name of your client (workstation/computer)<br />
<br />
 <br />
<br />
 <br />
<br />
This process will require the krb5-client (I installed all of it), Samba, and Samba-Winbind.<br />
<br />
 <br />
<br />
 Steps<br />
<br />
 <br />
<br />
 Step 1: Install the Required Packages – This can be done through Yast<br />
<br />
 <br />
<br />
 Step 2: Edit the /etc/krb5.conf File<br />
<br />
 <br />
<br />
[logging]<br />
<br />
    default = FILE10000:/var/log/krb5lib.log<br />
<br />
[libdefaults]<br />
<br />
    ticket_lifetime = 24000<br />
<br />
    default_realm = DOMAIN.INTERNAL<br />
<br />
    default_tkt_enctypes = des3-hmac-sha1 des-cbc-crc des-cbc-md5 aes256-cts arcfour-hmac-md5<br />
<br />
    default_tgs_enctypes = des3-hmac-sha1 des-cbc-crc des-cbc-md5 aes256-cts arcfour-hmac-md5<br />
<br />
[realms]<br />
<br />
    DOMAIN.INTERNAL = {<br />
<br />
        kdc = domainserver.domain.internal<br />
<br />
        admin_server = domainserver.domain.internal<br />
<br />
        default_domain = DOMAIN.INTERNAL<br />
<br />
}<br />
<br />
[domain_realm]<br />
<br />
    .domain.internal = DOMAIN.INTERNAL<br />
<br />
    domain.internal = DOMAIN.INTERNAL<br />
<br />
 <br />
<br />
Step 3: Edit /etc/samba/smb.conf <br />
<br />
 <br />
<br />
 [global]<br />
<br />
        security = ads<br />
<br />
        netbios name = NetBios Name<br />
<br />
        realm = DOMAIN.INTERNAL<br />
<br />
        password server = domainserver.domain.internal<br />
<br />
        workgroup = DOMAIN<br />
<br />
        idmap uid = 1000-29999<br />
<br />
        idmap gid = 1000-29999<br />
<br />
        winbind separator = +<br />
<br />
        winbind enum users = yes<br />
<br />
        winbind enum groups = yes<br />
<br />
        winbind use default domain = yes<br />
<br />
        template homedir = /home/%D/%U<br />
<br />
        template shell = /bin/bash<br />
<br />
        client use spnego = yes<br />
<br />
        domain master = no<br />
<br />
        server string = <br />
<br />
 <br />
<br />
 Step 4: Test the configuration with the testparm command – You should be able to see what you entered in the samba.conf file.<br />
<br />
 <br />
<br />
 Step 5: Edit /etc/nsswitch.conf to look like the example below<br />
<br />
 <br />
<br />
passwd:	compat winbind<br />
<br />
group:		compat winbind<br />
<br />
shadow:	compat<br />
<br />
hosts:		files dns wins<br />
<br />
networks:	files<br />
<br />
protocols:	db files<br />
<br />
services:	db files<br />
<br />
ethers:		db files<br />
<br />
rpc:		db files<br />
<br />
netgroup:	nis<br />
<br />
 <br />
<br />
Step 6: Modify the PAM settings<br />
<br />
 <br />
<br />
These files are all located in the /etc/pam.d folder<br />
<br />
 <br />
<br />
File:  common-account (It should contain only the following lines)<br />
<br />
 <br />
<br />
account sufficient	pam_winbind.so<br />
<br />
account required	pam_unix.so<br />
<br />
 <br />
<br />
 <br />
<br />
File:  common-auth (It should contain only the following lines)<br />
<br />
 <br />
<br />
auth    sufficient      pam_winbind.so<br />
<br />
auth    required        pam_unix.so nullok_secure use_first_pass<br />
<br />
 <br />
<br />
File:  common-password file  <br />
<br />
 <br />
<br />
password   required   pam_unix.so nullok obscure min=4 max=50 md5<br />
<br />
 <br />
<br />
File:  common-session<br />
<br />
 <br />
<br />
session required        pam_mkhomedir.so umask=0022 skel=/etc/skel<br />
<br />
 <br />
<br />
Step 7: Make a directory to hold domain user home directories<br />
<br />
 <br />
<br />
Note: Use Konsole for this<br />
<br />
Note: Use the value you put in the WORKGROUP tag smb.conf file<br />
<br />
 <br />
<br />
mkdir /home/DOMAIN<br />
<br />
 <br />
<br />
Step 8: Initialize Kerberos<br />
<br />
 <br />
<br />
Note:  Use Konsole for this<br />
<br />
 <br />
<br />
kinit domain_admin_account@DOMAIN.INTERNAL<br />
<br />
 <br />
<br />
Step 9:  Check to be sure you got a ticket from the domain controller<br />
<br />
 <br />
<br />
Note:  Use Konsole for this<br />
<br />
 <br />
<br />
klist<br />
<br />
 <br />
<br />
Step 10: Join the Domain <br />
<br />
 <br />
<br />
Note:  Use Konsole for this<br />
<br />
 <br />
<br />
net ads join -U domainadminuser@DOMAIN.INTERNAL<br />
<br />
 <br />
<br />
Step 11: Restart Samba-related Services<br />
<br />
 <br />
<br />
Note: The order is important<br />
<br />
Note:  Use Konsole for this<br />
<br />
 <br />
<br />
/etc/init.d/smb stop<br />
<br />
/etc/init.d/winbind stop<br />
<br />
/etc/init.d/smb start<br />
<br />
/etc/init.d/winbind start<br />
<br />
 <br />
<br />
Step 12:  Attempt to switch user and logon as a domain member.  If you can logon than you are successful.<br />
<br />
 <br />
<br />
Step 13: Configure SUDO<br />
<br />
 <br />
<br />
Add the “Domain Admins” group from windows to the /etc/sudoers file <br />
<br />
 <br />
<br />
%Domain Admins ALL=(ALL) ALL<br />
<br />
 <br />
<br />
Example:<br />
<br />
# sudoers file<br />
<br />
# Host alias specification<br />
<br />
# User alias specification<br />
<br />
# Cmnd alias specification<br />
<br />
# Defaults specification<br />
<br />
Defaults targetpw    # ask for the password of the target user i.e. root<br />
<br />
%users ALL=(ALL) ALL # WARNING! Only use this together with 'Defaults targetpw'!<br />
<br />
# Runas alias specification<br />
<br />
# User privilege specification<br />
<br />
root     ALL=(ALL) ALL<br />
<br />
 <br />
<br />
# Uncomment to allow people in group wheel to run all commands<br />
<br />
%Domain Admins     ALL=(ALL)     ALL<br />
<br />
 <br />
<br />
# Same thing without a password<br />
<br />
# %wheel        ALL=(ALL)       NOPASSWD: ALL<br />
<br />
# Samples<br />
<br />
# %users  ALL=/sbin/mount /cdrom,/sbin/umount /cdrom<br />
<br />
# %users  localhost=/sbin/shutdown -h now<br />
<br />
Step 14:  See if Konsole will list user names and group names from Windows:<br />
<br />
 <br />
<br />
wbinfo -u<br />
<br />
wbinfo -g<br />
<br />
 <br />
<br />
Step 15:  Make sure the permission on the DOMAIN folder under Homes is set to the correct permissions so that the new users can create their folder on login.<br />
<br />
]]></description>
			<content:encoded><![CDATA[<br />
This is how I was able to configure Suse 10.0 to authenticate on a Windows 2003 Active Directory Server.  I do not know if it will work on previous versions of Windows or with previous versions of Suse Linux.  <br />
<br />
 <br />
<br />
Notes:<br />
<br />
 <br />
<br />
1.Any text that reads domain.internal (lower case) you will replace with your domain.<br />
<br />
2.Any text that reads DOMAIN.INTERNAL (upper case) you will replace with your domain in upper case.<br />
<br />
3.Any text that reads DOMAIN (upper case) you will replace with your domain (no .internal)<br />
<br />
4.The NetBios name is the name of your client (workstation/computer)<br />
<br />
 <br />
<br />
 <br />
<br />
This process will require the krb5-client (I installed all of it), Samba, and Samba-Winbind.<br />
<br />
 <br />
<br />
 Steps<br />
<br />
 <br />
<br />
 Step 1: Install the Required Packages – This can be done through Yast<br />
<br />
 <br />
<br />
 Step 2: Edit the /etc/krb5.conf File<br />
<br />
 <br />
<br />
[logging]<br />
<br />
    default = FILE10000:/var/log/krb5lib.log<br />
<br />
[libdefaults]<br />
<br />
    ticket_lifetime = 24000<br />
<br />
    default_realm = DOMAIN.INTERNAL<br />
<br />
    default_tkt_enctypes = des3-hmac-sha1 des-cbc-crc des-cbc-md5 aes256-cts arcfour-hmac-md5<br />
<br />
    default_tgs_enctypes = des3-hmac-sha1 des-cbc-crc des-cbc-md5 aes256-cts arcfour-hmac-md5<br />
<br />
[realms]<br />
<br />
    DOMAIN.INTERNAL = {<br />
<br />
        kdc = domainserver.domain.internal<br />
<br />
        admin_server = domainserver.domain.internal<br />
<br />
        default_domain = DOMAIN.INTERNAL<br />
<br />
}<br />
<br />
[domain_realm]<br />
<br />
    .domain.internal = DOMAIN.INTERNAL<br />
<br />
    domain.internal = DOMAIN.INTERNAL<br />
<br />
 <br />
<br />
Step 3: Edit /etc/samba/smb.conf <br />
<br />
 <br />
<br />
 [global]<br />
<br />
        security = ads<br />
<br />
        netbios name = NetBios Name<br />
<br />
        realm = DOMAIN.INTERNAL<br />
<br />
        password server = domainserver.domain.internal<br />
<br />
        workgroup = DOMAIN<br />
<br />
        idmap uid = 1000-29999<br />
<br />
        idmap gid = 1000-29999<br />
<br />
        winbind separator = +<br />
<br />
        winbind enum users = yes<br />
<br />
        winbind enum groups = yes<br />
<br />
        winbind use default domain = yes<br />
<br />
        template homedir = /home/%D/%U<br />
<br />
        template shell = /bin/bash<br />
<br />
        client use spnego = yes<br />
<br />
        domain master = no<br />
<br />
        server string = <br />
<br />
 <br />
<br />
 Step 4: Test the configuration with the testparm command – You should be able to see what you entered in the samba.conf file.<br />
<br />
 <br />
<br />
 Step 5: Edit /etc/nsswitch.conf to look like the example below<br />
<br />
 <br />
<br />
passwd:	compat winbind<br />
<br />
group:		compat winbind<br />
<br />
shadow:	compat<br />
<br />
hosts:		files dns wins<br />
<br />
networks:	files<br />
<br />
protocols:	db files<br />
<br />
services:	db files<br />
<br />
ethers:		db files<br />
<br />
rpc:		db files<br />
<br />
netgroup:	nis<br />
<br />
 <br />
<br />
Step 6: Modify the PAM settings<br />
<br />
 <br />
<br />
These files are all located in the /etc/pam.d folder<br />
<br />
 <br />
<br />
File:  common-account (It should contain only the following lines)<br />
<br />
 <br />
<br />
account sufficient	pam_winbind.so<br />
<br />
account required	pam_unix.so<br />
<br />
 <br />
<br />
 <br />
<br />
File:  common-auth (It should contain only the following lines)<br />
<br />
 <br />
<br />
auth    sufficient      pam_winbind.so<br />
<br />
auth    required        pam_unix.so nullok_secure use_first_pass<br />
<br />
 <br />
<br />
File:  common-password file  <br />
<br />
 <br />
<br />
password   required   pam_unix.so nullok obscure min=4 max=50 md5<br />
<br />
 <br />
<br />
File:  common-session<br />
<br />
 <br />
<br />
session required        pam_mkhomedir.so umask=0022 skel=/etc/skel<br />
<br />
 <br />
<br />
Step 7: Make a directory to hold domain user home directories<br />
<br />
 <br />
<br />
Note: Use Konsole for this<br />
<br />
Note: Use the value you put in the WORKGROUP tag smb.conf file<br />
<br />
 <br />
<br />
mkdir /home/DOMAIN<br />
<br />
 <br />
<br />
Step 8: Initialize Kerberos<br />
<br />
 <br />
<br />
Note:  Use Konsole for this<br />
<br />
 <br />
<br />
kinit domain_admin_account@DOMAIN.INTERNAL<br />
<br />
 <br />
<br />
Step 9:  Check to be sure you got a ticket from the domain controller<br />
<br />
 <br />
<br />
Note:  Use Konsole for this<br />
<br />
 <br />
<br />
klist<br />
<br />
 <br />
<br />
Step 10: Join the Domain <br />
<br />
 <br />
<br />
Note:  Use Konsole for this<br />
<br />
 <br />
<br />
net ads join -U domainadminuser@DOMAIN.INTERNAL<br />
<br />
 <br />
<br />
Step 11: Restart Samba-related Services<br />
<br />
 <br />
<br />
Note: The order is important<br />
<br />
Note:  Use Konsole for this<br />
<br />
 <br />
<br />
/etc/init.d/smb stop<br />
<br />
/etc/init.d/winbind stop<br />
<br />
/etc/init.d/smb start<br />
<br />
/etc/init.d/winbind start<br />
<br />
 <br />
<br />
Step 12:  Attempt to switch user and logon as a domain member.  If you can logon than you are successful.<br />
<br />
 <br />
<br />
Step 13: Configure SUDO<br />
<br />
 <br />
<br />
Add the “Domain Admins” group from windows to the /etc/sudoers file <br />
<br />
 <br />
<br />
%Domain Admins ALL=(ALL) ALL<br />
<br />
 <br />
<br />
Example:<br />
<br />
# sudoers file<br />
<br />
# Host alias specification<br />
<br />
# User alias specification<br />
<br />
# Cmnd alias specification<br />
<br />
# Defaults specification<br />
<br />
Defaults targetpw    # ask for the password of the target user i.e. root<br />
<br />
%users ALL=(ALL) ALL # WARNING! Only use this together with 'Defaults targetpw'!<br />
<br />
# Runas alias specification<br />
<br />
# User privilege specification<br />
<br />
root     ALL=(ALL) ALL<br />
<br />
 <br />
<br />
# Uncomment to allow people in group wheel to run all commands<br />
<br />
%Domain Admins     ALL=(ALL)     ALL<br />
<br />
 <br />
<br />
# Same thing without a password<br />
<br />
# %wheel        ALL=(ALL)       NOPASSWD: ALL<br />
<br />
# Samples<br />
<br />
# %users  ALL=/sbin/mount /cdrom,/sbin/umount /cdrom<br />
<br />
# %users  localhost=/sbin/shutdown -h now<br />
<br />
Step 14:  See if Konsole will list user names and group names from Windows:<br />
<br />
 <br />
<br />
wbinfo -u<br />
<br />
wbinfo -g<br />
<br />
 <br />
<br />
Step 15:  Make sure the permission on the DOMAIN folder under Homes is set to the correct permissions so that the new users can create their folder on login.<br />
<br />
]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Setting up a simple NFS server]]></title>
			<link>https://www.linux-noob.com/forums/thread-2445.html</link>
			<pubDate>Tue, 06 Sep 2005 19:25:43 +0200</pubDate>
			<dc:creator><![CDATA[<a href="https://www.linux-noob.com/forums/member.php?action=profile&uid=644">xDamox</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.linux-noob.com/forums/thread-2445.html</guid>
			<description><![CDATA[<br />
In this guide I will show you how to setup a simple NFS server using Fedora, but I will show how to set it up via command line so you should be able to configure it on more than one distribution.<br />
<br />
 <br />
<br />
The first step is to make sure you have the NFS server software installed you can check this<br />
<br />
by issuing the following command:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>rpm -q nfs-utils</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
if you don't have this package installed, you can use the YUM packages management tool to install the package, to do this issue the following command:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>yum install nfs-utils</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Once you have installed the package you can begin to configure the NFS server, you should have<br />
<br />
a file in the /etc directory called: "exports". This file determines what directory's will be exported, who<br />
<br />
is allowed to access them and what permissions they have. <br />
<br />
 <br />
<br />
In this tutorial I will be exporting my /home directory and allowing only the IP of 192.168.0.13 to <br />
<br />
access this exported directory. So the first step is to edit the exports file and added the following:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/home 192.168.0.13(rw,nohide)</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
The above exports the /home directory with the read and write permissions the attributes<br />
<br />
inside the brackets can be read using the man command along with other attributes that can go in the brackets:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>man exports</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Once you have setup your export you should start the portmap daemon. The portmap daemon MUST always be running when running a NFS server. <br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>service portmap start</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Once your portmap has been started you can start your NFS server:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>service nfs start</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Once the service has started you can check everything is running by issue the following<br />
<br />
command:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>rpcinfo -p</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
You will get output similar to:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>  program vers proto   port<br />
   100000    2   tcp    111  portmapper<br />
   100000    2   udp    111  portmapper<br />
   100003    2   udp   2049  nfs<br />
   100003    3   udp   2049  nfs<br />
   100003    4   udp   2049  nfs<br />
   100003    2   tcp   2049  nfs<br />
   100003    3   tcp   2049  nfs<br />
   100003    4   tcp   2049  nfs<br />
   100021    1   udp  32833  nlockmgr<br />
   100021    3   udp  32833  nlockmgr<br />
   100021    4   udp  32833  nlockmgr<br />
   100021    1   tcp  32774  nlockmgr<br />
   100021    3   tcp  32774  nlockmgr<br />
   100021    4   tcp  32774  nlockmgr<br />
   100011    1   udp    704  rquotad<br />
   100011    2   udp    704  rquotad<br />
   100011    1   tcp    707  rquotad<br />
   100011    2   tcp    707  rquotad<br />
   100005    1   udp    706  mountd<br />
   100005    1   tcp    709  mountd<br />
   100005    2   udp    706  mountd<br />
   100005    2   tcp    709  mountd<br />
   100005    3   udp    706  mountd<br />
   100005    3   tcp    709  mountd</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Once everything is checked out and the services are running you can connect form 192.168.0.13 and mount the /home directory.<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>mount 192.168.0.2:/home /mnt/home</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Replace 192.168.0.2 with your NFS servers IP and the /mnt/home mount point to one that<br />
<br />
suites you.<br />
<br />
 <br />
<br />
if you make any changes to the export file you will need to reexport it instead of restarting the<br />
<br />
services issue the following:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>exportfs -r</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
well you can now setup a simple NFS server and store your files on the server <img src="https://www.linux-noob.com/forums/images/smilies/smile.png" alt="Smile" title="Smile" class="smilie smilie_1" /><br />
<br />
]]></description>
			<content:encoded><![CDATA[<br />
In this guide I will show you how to setup a simple NFS server using Fedora, but I will show how to set it up via command line so you should be able to configure it on more than one distribution.<br />
<br />
 <br />
<br />
The first step is to make sure you have the NFS server software installed you can check this<br />
<br />
by issuing the following command:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>rpm -q nfs-utils</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
if you don't have this package installed, you can use the YUM packages management tool to install the package, to do this issue the following command:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>yum install nfs-utils</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Once you have installed the package you can begin to configure the NFS server, you should have<br />
<br />
a file in the /etc directory called: "exports". This file determines what directory's will be exported, who<br />
<br />
is allowed to access them and what permissions they have. <br />
<br />
 <br />
<br />
In this tutorial I will be exporting my /home directory and allowing only the IP of 192.168.0.13 to <br />
<br />
access this exported directory. So the first step is to edit the exports file and added the following:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/home 192.168.0.13(rw,nohide)</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
The above exports the /home directory with the read and write permissions the attributes<br />
<br />
inside the brackets can be read using the man command along with other attributes that can go in the brackets:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>man exports</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Once you have setup your export you should start the portmap daemon. The portmap daemon MUST always be running when running a NFS server. <br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>service portmap start</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Once your portmap has been started you can start your NFS server:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>service nfs start</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Once the service has started you can check everything is running by issue the following<br />
<br />
command:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>rpcinfo -p</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
You will get output similar to:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>  program vers proto   port<br />
   100000    2   tcp    111  portmapper<br />
   100000    2   udp    111  portmapper<br />
   100003    2   udp   2049  nfs<br />
   100003    3   udp   2049  nfs<br />
   100003    4   udp   2049  nfs<br />
   100003    2   tcp   2049  nfs<br />
   100003    3   tcp   2049  nfs<br />
   100003    4   tcp   2049  nfs<br />
   100021    1   udp  32833  nlockmgr<br />
   100021    3   udp  32833  nlockmgr<br />
   100021    4   udp  32833  nlockmgr<br />
   100021    1   tcp  32774  nlockmgr<br />
   100021    3   tcp  32774  nlockmgr<br />
   100021    4   tcp  32774  nlockmgr<br />
   100011    1   udp    704  rquotad<br />
   100011    2   udp    704  rquotad<br />
   100011    1   tcp    707  rquotad<br />
   100011    2   tcp    707  rquotad<br />
   100005    1   udp    706  mountd<br />
   100005    1   tcp    709  mountd<br />
   100005    2   udp    706  mountd<br />
   100005    2   tcp    709  mountd<br />
   100005    3   udp    706  mountd<br />
   100005    3   tcp    709  mountd</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Once everything is checked out and the services are running you can connect form 192.168.0.13 and mount the /home directory.<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>mount 192.168.0.2:/home /mnt/home</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Replace 192.168.0.2 with your NFS servers IP and the /mnt/home mount point to one that<br />
<br />
suites you.<br />
<br />
 <br />
<br />
if you make any changes to the export file you will need to reexport it instead of restarting the<br />
<br />
services issue the following:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>exportfs -r</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
well you can now setup a simple NFS server and store your files on the server <img src="https://www.linux-noob.com/forums/images/smilies/smile.png" alt="Smile" title="Smile" class="smilie smilie_1" /><br />
<br />
]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Installing Samba 3.0.14a-2 under Fedora Core 4]]></title>
			<link>https://www.linux-noob.com/forums/thread-2561.html</link>
			<pubDate>Fri, 08 Jul 2005 21:31:14 +0200</pubDate>
			<dc:creator><![CDATA[<a href="https://www.linux-noob.com/forums/member.php?action=profile&uid=818">ASrael</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.linux-noob.com/forums/thread-2561.html</guid>
			<description><![CDATA[<br />
This Tutorial is free and may be distributed with reference to this website<br />
<br />
It is for people running Fedora Core 4 wanting to setup a working Samba<br />
<br />
Server to access the Shares on a Linux machine from a Windows machine<br />
<br />
 <br />
<br />
Commands are written in green<br />
<br />
Everything else are things you might edit / write / add <br />
<br />
 <br />
<br />
Get my Tutorials from <a href="http://www.bildunxxluecke.de/usr/fedora" target="_blank" rel="noopener" class="mycode_url">[/url]<a href="http://www.bildunxxluecke.de/usr/fedora" target="_blank" rel="noopener" class="mycode_url"></a><a href="http://www.bildunxxluecke.de/usr/fedora" target="_blank" rel="noopener" class="mycode_url"></a>[url=http://www.bildunxxluecke.de/usr/fedora]http://www.bildunxxluecke.de/usr/fedora</a><br />
<br />
 <br />
<br />
1.<br />
<br />
 <br />
<br />
--------------------------------------------------------------------------------<br />
<br />
 <br />
<br />
Prepare your Enviroment:<br />
<br />
 <br />
<br />
 - samba-common-3.0.14a-2.i386.rpm<br />
<br />
 - samba-3.0.14a-2.i386.rpm<br />
<br />
 - samba-client-3.0.14a-2.i386.rpm<br />
<br />
 - samba-swat-3.0.14a-2.i386.rpm (install only if you want have samba-webinterface)<br />
<br />
 <br />
<br />
2.<br />
<br />
 <br />
<br />
--------------------------------------------------------------------------------<br />
<br />
 <br />
<br />
Now its time to configure SAMBA:<br />
<br />
 <br />
<br />
 rpm -i samba-common-3.0.14a-2.i386.rpm<br />
<br />
 rpm -i samba-3.0.14a-2.i386.rpm<br />
<br />
 rpm -i samba-client-3.0.14a-2.i386.rpm<br />
<br />
 rpm -i samba-swat-3.0.14a-2.i386.rpm<br />
<br />
 <br />
<br />
3.<br />
<br />
 <br />
<br />
--------------------------------------------------------------------------------<br />
<br />
 <br />
<br />
Everything should be installed now, its time to configure Samba:<br />
<br />
 <br />
<br />
 - cd /etc/samba/<br />
<br />
 - vi smb.conf<br />
<br />
 <br />
<br />
You can safely edit this file (in fact you must) necessary is :<br />
<br />
workgroup = &lt; your windows network workgroup &gt; e.g.: WORKGROUP<br />
<br />
server string = &lt; Information about your Samba Server &gt;<br />
<br />
netbios name = &lt; Hostname of Sambaserver &gt; e.g.: SMBSERV01<br />
<br />
 <br />
<br />
You dont need to touch the shares so far, if you want to share<br />
<br />
other directorys keep and eye on the examples in the smb.conf<br />
<br />
 <br />
<br />
4.<br />
<br />
 <br />
<br />
--------------------------------------------------------------------------------<br />
<br />
 <br />
<br />
Now everything is done and you can start:<br />
<br />
 [root@test] smbd -D<br />
<br />
 [root@test] nmbd -D<br />
<br />
 <br />
<br />
Now you should be able to access your Sambaserver from your<br />
<br />
Windowsmachine via \\&lt; smb machine ip &gt;<br />
<br />
 <br />
<br />
(5.)<br />
<br />
 <br />
<br />
--------------------------------------------------------------------------------<br />
<br />
 <br />
<br />
For those who want to use swat with samba :<br />
<br />
 <br />
<br />
 - cd /etc/xinetd.d/<br />
<br />
 - vi swat<br />
<br />
  change disable = yes to =&gt; disable = no<br />
<br />
 - cd /etc/<br />
<br />
 - vi services<br />
<br />
  make sure the following line is in it : swat 901/tcp # Samba Web Administration Tool<br />
<br />
  to test do 'grep 901 /etc/services' , if not in insert it<br />
<br />
  now do : service xinetd restart<br />
<br />
 <br />
<br />
Swat should be running now ! <br />
<br />
 <br />
<br />
(6.)<br />
<br />
 <br />
<br />
--------------------------------------------------------------------------------<br />
<br />
 <br />
<br />
To access Swat Webinterface from Lan : <br />
<br />
 <br />
<br />
 - cd /etc/xinetd.d/<br />
<br />
 - vi swat<br />
<br />
  change 'only_from = 127.0.0.1' to 'only_from = 'your.netmask.0.0' e.g.: '192.168.0.0'<br />
<br />
  the 0 stands for wildcards (e.g. 192.168.0.0 to 192.168.255.255)<br />
<br />
 <br />
<br />
 <br />
<br />
--------------------------------------------------------------------------------<br />
<br />
 <br />
<br />
Everything is fine .. enjoy now just do http:// SAMBAIP : 901 and login as root<br />
<br />
]]></description>
			<content:encoded><![CDATA[<br />
This Tutorial is free and may be distributed with reference to this website<br />
<br />
It is for people running Fedora Core 4 wanting to setup a working Samba<br />
<br />
Server to access the Shares on a Linux machine from a Windows machine<br />
<br />
 <br />
<br />
Commands are written in green<br />
<br />
Everything else are things you might edit / write / add <br />
<br />
 <br />
<br />
Get my Tutorials from <a href="http://www.bildunxxluecke.de/usr/fedora" target="_blank" rel="noopener" class="mycode_url">[/url]<a href="http://www.bildunxxluecke.de/usr/fedora" target="_blank" rel="noopener" class="mycode_url"></a><a href="http://www.bildunxxluecke.de/usr/fedora" target="_blank" rel="noopener" class="mycode_url"></a>[url=http://www.bildunxxluecke.de/usr/fedora]http://www.bildunxxluecke.de/usr/fedora</a><br />
<br />
 <br />
<br />
1.<br />
<br />
 <br />
<br />
--------------------------------------------------------------------------------<br />
<br />
 <br />
<br />
Prepare your Enviroment:<br />
<br />
 <br />
<br />
 - samba-common-3.0.14a-2.i386.rpm<br />
<br />
 - samba-3.0.14a-2.i386.rpm<br />
<br />
 - samba-client-3.0.14a-2.i386.rpm<br />
<br />
 - samba-swat-3.0.14a-2.i386.rpm (install only if you want have samba-webinterface)<br />
<br />
 <br />
<br />
2.<br />
<br />
 <br />
<br />
--------------------------------------------------------------------------------<br />
<br />
 <br />
<br />
Now its time to configure SAMBA:<br />
<br />
 <br />
<br />
 rpm -i samba-common-3.0.14a-2.i386.rpm<br />
<br />
 rpm -i samba-3.0.14a-2.i386.rpm<br />
<br />
 rpm -i samba-client-3.0.14a-2.i386.rpm<br />
<br />
 rpm -i samba-swat-3.0.14a-2.i386.rpm<br />
<br />
 <br />
<br />
3.<br />
<br />
 <br />
<br />
--------------------------------------------------------------------------------<br />
<br />
 <br />
<br />
Everything should be installed now, its time to configure Samba:<br />
<br />
 <br />
<br />
 - cd /etc/samba/<br />
<br />
 - vi smb.conf<br />
<br />
 <br />
<br />
You can safely edit this file (in fact you must) necessary is :<br />
<br />
workgroup = &lt; your windows network workgroup &gt; e.g.: WORKGROUP<br />
<br />
server string = &lt; Information about your Samba Server &gt;<br />
<br />
netbios name = &lt; Hostname of Sambaserver &gt; e.g.: SMBSERV01<br />
<br />
 <br />
<br />
You dont need to touch the shares so far, if you want to share<br />
<br />
other directorys keep and eye on the examples in the smb.conf<br />
<br />
 <br />
<br />
4.<br />
<br />
 <br />
<br />
--------------------------------------------------------------------------------<br />
<br />
 <br />
<br />
Now everything is done and you can start:<br />
<br />
 [root@test] smbd -D<br />
<br />
 [root@test] nmbd -D<br />
<br />
 <br />
<br />
Now you should be able to access your Sambaserver from your<br />
<br />
Windowsmachine via \\&lt; smb machine ip &gt;<br />
<br />
 <br />
<br />
(5.)<br />
<br />
 <br />
<br />
--------------------------------------------------------------------------------<br />
<br />
 <br />
<br />
For those who want to use swat with samba :<br />
<br />
 <br />
<br />
 - cd /etc/xinetd.d/<br />
<br />
 - vi swat<br />
<br />
  change disable = yes to =&gt; disable = no<br />
<br />
 - cd /etc/<br />
<br />
 - vi services<br />
<br />
  make sure the following line is in it : swat 901/tcp # Samba Web Administration Tool<br />
<br />
  to test do 'grep 901 /etc/services' , if not in insert it<br />
<br />
  now do : service xinetd restart<br />
<br />
 <br />
<br />
Swat should be running now ! <br />
<br />
 <br />
<br />
(6.)<br />
<br />
 <br />
<br />
--------------------------------------------------------------------------------<br />
<br />
 <br />
<br />
To access Swat Webinterface from Lan : <br />
<br />
 <br />
<br />
 - cd /etc/xinetd.d/<br />
<br />
 - vi swat<br />
<br />
  change 'only_from = 127.0.0.1' to 'only_from = 'your.netmask.0.0' e.g.: '192.168.0.0'<br />
<br />
  the 0 stands for wildcards (e.g. 192.168.0.0 to 192.168.255.255)<br />
<br />
 <br />
<br />
 <br />
<br />
--------------------------------------------------------------------------------<br />
<br />
 <br />
<br />
Everything is fine .. enjoy now just do http:// SAMBAIP : 901 and login as root<br />
<br />
]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[NFS mounts]]></title>
			<link>https://www.linux-noob.com/forums/thread-2733.html</link>
			<pubDate>Thu, 21 Apr 2005 09:17:07 +0200</pubDate>
			<dc:creator><![CDATA[<a href="https://www.linux-noob.com/forums/member.php?action=profile&uid=743">Shock Wave</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.linux-noob.com/forums/thread-2733.html</guid>
			<description><![CDATA[I'm trying to incorporate a status check on any/all NFS mounts on my system into a script. Is there a simple command that does this? I tried Google-ing up an answer but found nothing helpful. I suck. Anyone have any ideas?<br />
]]></description>
			<content:encoded><![CDATA[I'm trying to incorporate a status check on any/all NFS mounts on my system into a script. Is there a simple command that does this? I tried Google-ing up an answer but found nothing helpful. I suck. Anyone have any ideas?<br />
]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[How to mount a Windows share with smbmount]]></title>
			<link>https://www.linux-noob.com/forums/thread-2785.html</link>
			<pubDate>Mon, 21 Mar 2005 23:52:21 +0100</pubDate>
			<dc:creator><![CDATA[<a href="https://www.linux-noob.com/forums/member.php?action=profile&uid=740">znx</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.linux-noob.com/forums/thread-2785.html</guid>
			<description><![CDATA[<br />
After seeing the how to mount a fat32 partition I thought I'd show you how to mount a share.<br />
<br />
 <br />
<br />
First off you need to make sure the share it setup correctly on your Windows system, I'll only focus on sharing with WinXP.<br />
<br />
 <br />
<br />
Its not hard on WinXP. First off right-click on the folder you wish to share and select "Sharing and Security".<br />
<br />
 <br />
<br />
Select "Share this folder".<br />
<br />
 <br />
<br />
You can now set the Share name, you can also fiddle with the maximum number of users allowed at one time (the default is normally good enough).<br />
<br />
 <br />
<br />
If you want to heighten the security in this share you can click on "Permissions" and remove the default "Everyone" group (select and click Remove). After this you can click Add. Type the username that will be used to allow access (this has to be a valid user on your WinXP machine). Click Ok, and Ok again. The folder icon should alter and a hand will be holding the folder. This indicates a network share.<br />
<br />
 <br />
<br />
Ok so you need to know these things:<br />
<br />
The hostname of the WinXP PC (eg winpc). Right click on "My Computer" click on "Computer Name". Look at the "Full Computer Name".<br />
<br />
 <br />
<br />
The sharename of the folder (eg shared) Do you remember what you called it <img src="https://www.linux-noob.com/forums/images/smilies/tongue.png" alt="Tongue" title="Tongue" class="smilie smilie_5" />.<br />
<br />
 <br />
<br />
A user/pass for the winxp system. This is only required if you altered the permissions (i.e. if its not sharing to Everyone).<br />
<br />
 <br />
<br />
Phew 50% of the way there.<br />
<br />
 <br />
<br />
Ok so onto the Linux system, its relatively simple:<br />
<br />
 <br />
<br />
Make the directory you want to mount the share to.<br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>mkdir /mnt/share</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Next either...<br />
<br />
 <br />
<br />
Mount the share with user/pass:<br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>smbmount //winpc/shared /mnt/share -o username=user,password=pass,rw</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Or mount the share without a user/pass (this is true if Everyone is still set)<br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>smbmount //winpc/shared /mnt/share -o rw</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Hopefully thats it. Now you can use the share. You cannot create symbolic links or chmod the system (this is restriction on the WinXP side).<br />
<br />
 <br />
<br />
If you wish to allow users on the linux side access to the share then you will need to alter the options. Adding in uid= or gid= to allow access to users or groups respectively by mounting the drive with there permissions. Here's an example:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>smbmount //winpc/shared /mnt/share -o rw,uid=znx</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
This will mount the drive as if user znx had done it. Thus he will have rw access to the shared.<br />
<br />
 <br />
<br />
Hands up who I managed to confuse  <img src="https://www.linux-noob.com/forums/images/smilies/wink.png" alt="Wink" title="Wink" class="smilie smilie_2" /><br />
<br />
]]></description>
			<content:encoded><![CDATA[<br />
After seeing the how to mount a fat32 partition I thought I'd show you how to mount a share.<br />
<br />
 <br />
<br />
First off you need to make sure the share it setup correctly on your Windows system, I'll only focus on sharing with WinXP.<br />
<br />
 <br />
<br />
Its not hard on WinXP. First off right-click on the folder you wish to share and select "Sharing and Security".<br />
<br />
 <br />
<br />
Select "Share this folder".<br />
<br />
 <br />
<br />
You can now set the Share name, you can also fiddle with the maximum number of users allowed at one time (the default is normally good enough).<br />
<br />
 <br />
<br />
If you want to heighten the security in this share you can click on "Permissions" and remove the default "Everyone" group (select and click Remove). After this you can click Add. Type the username that will be used to allow access (this has to be a valid user on your WinXP machine). Click Ok, and Ok again. The folder icon should alter and a hand will be holding the folder. This indicates a network share.<br />
<br />
 <br />
<br />
Ok so you need to know these things:<br />
<br />
The hostname of the WinXP PC (eg winpc). Right click on "My Computer" click on "Computer Name". Look at the "Full Computer Name".<br />
<br />
 <br />
<br />
The sharename of the folder (eg shared) Do you remember what you called it <img src="https://www.linux-noob.com/forums/images/smilies/tongue.png" alt="Tongue" title="Tongue" class="smilie smilie_5" />.<br />
<br />
 <br />
<br />
A user/pass for the winxp system. This is only required if you altered the permissions (i.e. if its not sharing to Everyone).<br />
<br />
 <br />
<br />
Phew 50% of the way there.<br />
<br />
 <br />
<br />
Ok so onto the Linux system, its relatively simple:<br />
<br />
 <br />
<br />
Make the directory you want to mount the share to.<br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>mkdir /mnt/share</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Next either...<br />
<br />
 <br />
<br />
Mount the share with user/pass:<br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>smbmount //winpc/shared /mnt/share -o username=user,password=pass,rw</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Or mount the share without a user/pass (this is true if Everyone is still set)<br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>smbmount //winpc/shared /mnt/share -o rw</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Hopefully thats it. Now you can use the share. You cannot create symbolic links or chmod the system (this is restriction on the WinXP side).<br />
<br />
 <br />
<br />
If you wish to allow users on the linux side access to the share then you will need to alter the options. Adding in uid= or gid= to allow access to users or groups respectively by mounting the drive with there permissions. Here's an example:<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>smbmount //winpc/shared /mnt/share -o rw,uid=znx</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
This will mount the drive as if user znx had done it. Thus he will have rw access to the shared.<br />
<br />
 <br />
<br />
Hands up who I managed to confuse  <img src="https://www.linux-noob.com/forums/images/smilies/wink.png" alt="Wink" title="Wink" class="smilie smilie_2" /><br />
<br />
]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Winbind = using Windows ADS Accounts to login]]></title>
			<link>https://www.linux-noob.com/forums/thread-3200.html</link>
			<pubDate>Fri, 13 Aug 2004 15:25:56 +0200</pubDate>
			<dc:creator><![CDATA[<a href="https://www.linux-noob.com/forums/member.php?action=profile&uid=80">Strabo</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.linux-noob.com/forums/thread-3200.html</guid>
			<description><![CDATA[<br />
This post is to show you how to use Windows ADS accounts to login to your Linux server instead of manually making seperate Linux local accounts. The reason I did this is because some of our clients wanted to use sftp and the easiest way to manage all the different accounts for each client is creating OU's in Active Directory Services in Windows. This document will work with Windows 2000 or 2003 ADS.<br />
<br />
 <br />
<br />
Winbind is integrated with Samba and will require you to configure Samba and PAM for this operation to work succesfully. Lets get started <img src="https://www.linux-noob.com/forums/images/smilies/smile.png" alt="Smile" title="Smile" class="smilie smilie_1" /><br />
<br />
 <br />
<br />
Step 1:<br />
<br />
 <br />
<br />
Lets backup your smb.conf file incase you make a mistake you can start over<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>cp /etc/samba/smb.conf /etc/samba/smb.bak</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Step 2: <br />
<br />
 <br />
<br />
Now its time to edit your smb.conf file<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>vi /etc/samba/smb.conf</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Step 3:<br />
<br />
 <br />
<br />
Now enter in the following below. You can delete the contents of your orginal smb.conf file as this will replace everything in there.<br />
<br />
 <br />
<br />
You will have to change the following lines to your configuration:<br />
<br />
 <br />
<br />
workgroup = <br />
<br />
]]></description>
			<content:encoded><![CDATA[<br />
This post is to show you how to use Windows ADS accounts to login to your Linux server instead of manually making seperate Linux local accounts. The reason I did this is because some of our clients wanted to use sftp and the easiest way to manage all the different accounts for each client is creating OU's in Active Directory Services in Windows. This document will work with Windows 2000 or 2003 ADS.<br />
<br />
 <br />
<br />
Winbind is integrated with Samba and will require you to configure Samba and PAM for this operation to work succesfully. Lets get started <img src="https://www.linux-noob.com/forums/images/smilies/smile.png" alt="Smile" title="Smile" class="smilie smilie_1" /><br />
<br />
 <br />
<br />
Step 1:<br />
<br />
 <br />
<br />
Lets backup your smb.conf file incase you make a mistake you can start over<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>cp /etc/samba/smb.conf /etc/samba/smb.bak</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Step 2: <br />
<br />
 <br />
<br />
Now its time to edit your smb.conf file<br />
<br />
 <br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>vi /etc/samba/smb.conf</code></div></div><br />
<br />
<br />
<br />
 <br />
<br />
Step 3:<br />
<br />
 <br />
<br />
Now enter in the following below. You can delete the contents of your orginal smb.conf file as this will replace everything in there.<br />
<br />
 <br />
<br />
You will have to change the following lines to your configuration:<br />
<br />
 <br />
<br />
workgroup = <br />
<br />
]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Mount a shared drive]]></title>
			<link>https://www.linux-noob.com/forums/thread-3682.html</link>
			<pubDate>Mon, 26 Jan 2004 23:59:04 +0100</pubDate>
			<dc:creator><![CDATA[<a href="https://www.linux-noob.com/forums/member.php?action=profile&uid=101">Sheriff</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.linux-noob.com/forums/thread-3682.html</guid>
			<description><![CDATA[<br />
Hello, I hope someone may beable to help me.<br />
<br />
I have two computers with drives I need access to, what I do right now is this:<br />
<br />
from a terminal I su - so I am on as root then type in:<br />
<br />
Mount -t smb //xbox/f /mnt/xbox<br />
<br />
once I hit enter it asks for a password I type it in and viola that drive is now mounted.<br />
<br />
the other one is:<br />
<br />
Mount -t smb //192.168.0.100/storage /mnt/pc2<br />
<br />
once I hit enter it asks for a password I type it in and viola that drive is now mounted.<br />
<br />
I can also type it in this way:<br />
<br />
Mount -a //xbox/f /mnt/xbox and it works fine after I enter my password.<br />
<br />
 <br />
<br />
What I would really like to know is how do I enter this into FSTAB so this is all done automatic at boot?<br />
<br />
I would sure love a small guide from someone on how to enter this properly  <img src="https://www.linux-noob.com/forums/images/smilies/smile.png" alt="Smile" title="Smile" class="smilie smilie_1" /><br />
<br />
 <br />
<br />
Thank you for any help<br />
<br />
 <br />
<br />
Sheriff<br />
<br />
]]></description>
			<content:encoded><![CDATA[<br />
Hello, I hope someone may beable to help me.<br />
<br />
I have two computers with drives I need access to, what I do right now is this:<br />
<br />
from a terminal I su - so I am on as root then type in:<br />
<br />
Mount -t smb //xbox/f /mnt/xbox<br />
<br />
once I hit enter it asks for a password I type it in and viola that drive is now mounted.<br />
<br />
the other one is:<br />
<br />
Mount -t smb //192.168.0.100/storage /mnt/pc2<br />
<br />
once I hit enter it asks for a password I type it in and viola that drive is now mounted.<br />
<br />
I can also type it in this way:<br />
<br />
Mount -a //xbox/f /mnt/xbox and it works fine after I enter my password.<br />
<br />
 <br />
<br />
What I would really like to know is how do I enter this into FSTAB so this is all done automatic at boot?<br />
<br />
I would sure love a small guide from someone on how to enter this properly  <img src="https://www.linux-noob.com/forums/images/smilies/smile.png" alt="Smile" title="Smile" class="smilie smilie_1" /><br />
<br />
 <br />
<br />
Thank you for any help<br />
<br />
 <br />
<br />
Sheriff<br />
<br />
]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Samba Questions]]></title>
			<link>https://www.linux-noob.com/forums/thread-3979.html</link>
			<pubDate>Mon, 15 Dec 2003 17:03:34 +0100</pubDate>
			<dc:creator><![CDATA[<a href="https://www.linux-noob.com/forums/member.php?action=profile&uid=9">kZo</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.linux-noob.com/forums/thread-3979.html</guid>
			<description><![CDATA[Does Samba work with Active Directory and Server 2003 Yet?  Anyone know?<br />
]]></description>
			<content:encoded><![CDATA[Does Samba work with Active Directory and Server 2003 Yet?  Anyone know?<br />
]]></content:encoded>
		</item>
	</channel>
</rss>