Via: Novell (this is an excerpt)
Situation
A Windows (or Samba) share has been made available on the network. On your SLED system you can browse to the share or use the mount command to access the share but need to have permanent access to this share every time the SLED system is booted.
Hey! This was helpful so far, right? Care to make a small donation for the effort?
Resolution
The configuration file “/etc/fstab” is used to specify the local partitions and remote file systems to be mounted on startup of the system. A line can be added to this file with the following format:
//<Winserver>/<Share> <Mountpoint> <FileSystemType> <Options> 0 0
Here’s an example, setting the group ID and the permissions to allow those in the group “users” Read and Write access to the share:
//winserver/share /mnt/winshare cifs gid=users,file_mode=0664,dir_mode=0775,auto,username=john,password=johnpass 0 0
This example assumes the following values (includes explanation where needed):
//winserver/share (Windows Share)
The Windows system (winserver) could be identified as a DNS hostname or IP address.
/mnt/winshare (Mount Point)
This is the already existing directory on the SLED local file system which will become the access point to the remote Windows share. You can create this directory anywhere on your system. Just modify the command appropriately.
cifs (File System Type)
This used to be “smbfs” but smbfs is no longer being developed and is no longer supported.
gid=users
All files and directories on the remote system (including the mount point) will be assigned the group “users”.
file_mode=0664
All existing files on the remote system will be assigned permissions of “rw-rw-r–”.
dir_mode=0775
All existing directories (including the mount point) on the remote system will be assigned “rwxrwxr-x”.
auto
Automatically mount on system boot.
username=john
Windows user to connect with: john
password=johnpass
John’s Password: johnpass
0
Indicates that this file system should not be dumped.
0
Indicates that this file system should not be checked by fsck.
Troubleshooting
If the share is not getting mounted you can attempt to mount the share manually, as the root user, to see if there are any errors. Here’s the command:
mount -t cifs -o username=<WindowsUserID>,password=<UserPassword> //<WinServer>/<Share> /<Mountpoint>
Following our example:
mount -t cifs -o username=john,password=johnpass //winserver/share /mnt/winshare
If the password is omitted from the mount command it will be asked for after issuing the command.
Additional Information
You may not want the user ID and password to be viewable in the /etc/fstab file for security reasons. You can create a file in a secure directory that will hold the user ID and password information and be referenced by the fstab entry. Remove the “username=” and “password=” entries from the options and add “credentials=<PathToFile>”.
The following 2 lines should be in the credential text file that you create (replacing <bracketed> items with your specific information):
username=<WindowsUserID>
password=<UserPassword>
August 2nd, 2008 - 7:56 pm
[...] was a variety of technical posts such as this one about Windows shares. In what appears like a new site, SUSEGeek, there have been quite a few instructional posts [...]
September 3rd, 2008 - 1:00 pm
[...] recorded first by mecollin on 2008-08-20→ Automatically mount a windows share at boot time in OpenSuse 11 [...]
August 21st, 2009 - 11:48 pm
uvyliwe…
Bbq Rub Recipie …