[GLLUG] Is there a Windows equivalent to /etc/fstab?
Daniel Hedlund
daniel at digitree.org
Thu Oct 12 13:14:50 EDT 2006
Andy Lee wrote:
> I need to create some persistent connections to network shares from
> Windows servers, and haven't been able to figure out how to do it, so
> I'm hoping someone here might have done something similar. The problem
> is that Windows shares are tied to a log in, and the server generally
> isn't logged in. I want to somehow store the credentials so that a
> network share can be mounted and available to all user accounts on this
> machine. On Linux I would just add an entry to /etc/fstab (with the
> credentials in a different chmod 600 file ), but I can't find a Windows
> equivalent.
There are some inherent differences in the way the SMB protocol
(Samba/Windows Network Shares) works that would prevent you from always
keeping a remote filesystem mounted. The biggest of which is that the
SMB protocol requires you to log in with a username and password. Once
you map a network drive, that share is tied to that username and
password. Mapped network shares are only seen by a particular user who
mounted it and multiple users on the same system can each have mapped
drive letters, H: for example, point to different network shares. It
doesn't work like Unix-based NFS, which is what it sounds like you're
trying to achieve.
When you're talking about making shares available to all users on the
machine, you're only referring to users who log in and not including
things like scheduled tasks running in the background, correct? Have
you considered having using scripts on a PDC (primary domain controller)
to automatically mount each user's network shares for them on login?
That is usually what people in the Windows world do (see "net use" command):
http://support.microsoft.com/kb/308582
Scheduled task can also map and unmap network drives when they need
them. Network drives are never persistent, they're always unmapped when
a user logs out.
Alternatively, if you really do want something like NFS, consider using
a Windows NFS client. Microsoft is supposed to have one in their free
Unix tools and I'm sure there are some other places that have them, but
I'm not of any names off the top of my head. I'm also not sure if
NFS-style mounts can be created that persist even when users are not
logged in.
Cheers,
Daniel Hedlund
daniel at digitree.org
More information about the linux-user
mailing list