Auto Mount Windows Server folders - Fstab - Cifs - Creds to Linux Box

It’s 2012 and I can take 6.25 minutes to breath, so lets try again.

I am trying to mount (connect to) folders on my company server, at boot and have the user name & password handled by the credentials file so that I can open & save files as easily as if it was a local file. I have if you have read the post last year, tried just about everything, except moving the server into my office and using it as a box.

what I have done is…

Opened Terminal in Super User mode kwrite /etc/fstab Added ther line below /etc/fstab. Saved & closed fstab opened a new file in kwrite wrote username=WorldTextingFederations (You get the idea) the next line is password=yeahsureyoubetcha Then saved the file in /etc as .creds Next I closed kwrite and exited Terminal

Below are the lines EXACTLY (not really everyone seems to freak if you do put in the real IP, user, folder)

/etc/fstab

//192.168.18.119/Newtgingrich //smb://192.168.18.119/Newtgingrich/republicans/1d10ts cifs credentials=/root/etc/.creds,_netdev 0 0

/etc/.creds

username=Newtgingrich
password=Gurs9sa

Then I ran Mount in Terminal super User mode to see what the reaction to this is

mount -a

solutions:~ # mount -a
Couldn’t chdir to //smb://192.168.18.119/Newtgingrich/republicans/1d10ts: No such file or directory

Oddly enough when I plug the line below in Konqueror or the one below Dolphin…they show up with no errors.

Konqueror

/smb:/192.168.18.119/Newtgingrich/republicans/1d10ts

Dolphin

smb://Newtgingrich@crussell-server/Newtgingrich/4prezadent/1d10ts/

So, what did I miss…besides the bus or the meal?

Please use CODE tags around your computer text parts of your posts: http://forums.opensuse.org/english/information-new-users/advanced-how-faq-read-only/451526-posting-code-tags-guide.html
Preferable inclusing the prompt and the command you used to get the output you post.

It will create clear boundaries between you story and the computer facts. It will maintain the lay-out of the computer text and do more nice things.

On 07/27/2012 07:46 AM, China Jobs wrote:
> so lets try again.

i’m not a networking guru so i probably can’t answer your Q, but as far
as i can see neither could anyone else without making a LOT of
assumptions–or reading last years thread…(link?)

so assume no one who can help has read last years thread and begin anew:

-your computer is running what operating system, and version? (and, are
you running with software from Tumbleweed, Evergreen, or factory?)

-because the way the user interacts with the networking depends on the
desktop environment in use, what DE and version do you use?

-the company server you want to “open & save files” on is running what
operating system and version?

-the “credentials file” you mention, will that be used via NFS, telnet,
ssh, http, VPN, secure tunnel, remote desktop, cloud or what just what
kind of networking protocol/technique is the company server expecting
you to use?

-oh! squinting i find three characters that gives a hint about one end
of the network, maybe “smb” means the company server is Windows? and six
characters “kwrite” means you are maybe running KDE?

so, i think with that info above there might some networking gurus that
can help…

oops! according to the terms and conditions of this forum: political
commentary is disallowed (no matter how you choose to present it)…i
just saw that and wonder if the mods will allow it to stay??


dd

Am 27.07.2012 07:46, schrieb China Jobs:
> //192.168.18.119/Newtgingrich
> //smb://192.168.18.119/Newtgingrich/republicans/1d10ts cifs
> credentials=/root/etc/.creds,_netdev 0 0

Have you created an empty directory with that name?
//smb://192.168.18.119/Newtgingrich/republicans/1d10ts

I doubt that since that is not a valid directory name in Linux.
The mount point has to be a valid Linux directory which has to exist.


PC: oS 12.1 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.4 | GeForce GT 420
ThinkPad E320: oS 12.1 x86_64 | i3@2.30GHz | 8GB | KDE 4.8.4 | HD 3000
eCAFE 800: oS 12.1 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10

Am 27.07.2012 14:09, schrieb Martin Helm:
>> //smb://192.168.18.119/Newtgingrich/republicans/1d10ts cifs
> Have you created an empty directory with that name?
> //smb://192.168.18.119/Newtgingrich/republicans/1d10ts
>
You can do a quick test
replace the fancy
“//smb://192.168.18.119/Newtgingrich/republicans/1d10ts” with /mnt in
your fstab and check if that works (of course your windows share will
then be visible in /mnt).
If that works for you, create a directory which pleases you more as
mount point and change it accordingly, for example
/smb/192.168.18.119/Newtgingrich would be a valid path name in Linux
of course you have to create it before using it.


sudo mkdir -p /smb/192.168.18.119/Newtgingrich

for example.


PC: oS 12.1 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.4 | GeForce GT 420
ThinkPad E320: oS 12.1 x86_64 | i3@2.30GHz | 8GB | KDE 4.8.4 | HD 3000
eCAFE 800: oS 12.1 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10

I did not post the following in my post above, because I stopt reading your post after I found out that it wouild took me time to unravel the puzzle of mixed story/computer text. But I now feel that I have to make a few remarks.

  1. I noticed the fake names that are used. It is indeed touching the T&C, thus please China_jobs, try to avoid those “jokes” in the future

  2. This seems to be about SAMBA. It is a pitty that you did not mention that keyword prominantly to draw the attention of people with SAMBA knowledge. In any case, for many this is the place to go and find a solution when they want to use SAMBA: openSUSE SuSE Linux HOWTOs and Tutorials by Swerdna

  3. You indeed did not give a lot of information about what you have or try to use or do there. Of course nobody here will even remember that you asked something last year, let alone search for it. When there is valuable information there, you could copy/paste that in your thread here. After all it is you who wants help and IMHO you should make it the volunteers here as easy as possible to help you. Then they will try to do so gladly.

  4. To Martin. While your assumption that the OP does not realy want to mount to the place he says is almost certainly true, it is IMHO not true that //smb://192.168.18.119/Newtgingrich/republicans/1d10ts is not a valid path (string of directory names). The // simply reduces to a single / and both : and . are valid within file names. I did change a little bit because I did not want to show this inside / as root, but I think it will convince you:


henk@boven:~> mkdir -p .///smb://192.168.18.119/Newtgingrich/republicans/1d10ts
henk@boven:~> l smb\:/
totaal 12
drwxr-xr-x  3 henk wij 4096 27 jul 14:34 ./
drwxr-xr-x 84 henk wij 4096 27 jul 14:34 ../
drwxr-xr-x  3 henk wij 4096 27 jul 14:34 192.168.18.119/
henk@boven:~>

Am 27.07.2012 14:46, schrieb hcvv:
> 4) To Martin. While your assumption that the OP does not realy want to
> mount to the place he says is almost certainly true, it is IMHO not true
> that //smb://192.168.18.119/Newtgingrich/republicans/1d10ts is not a
> valid path (string of directory names). The // simply reduces to a
> single / and both : and . are valid within file names.

Thanks Henk, while I know the : and . are valid, I did not know the //
is valid. Every day I learn something new.


PC: oS 12.1 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.4 | GeForce GT 420
ThinkPad E320: oS 12.1 x86_64 | i3@2.30GHz | 8GB | KDE 4.8.4 | HD 3000
eCAFE 800: oS 12.1 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10

Well, the / is not as much valid as the . and :. The latter two are simply as valid as a and 1, but the / is not valid in a file name (one of the very few characters), but in using it double, or triple in a path, it it is often (at least in the shell) interpreted to as if there was only one /. I am not sure if this removal of redundant / is done on an application level, or that the library calls where you use them in (for opening files, etc.) do this (which would of course be very nice for the developers).

You seem to be trying to mount the remote files into a remote location, which doesn’t make sense to me.
This stuff: //smb://192.168.18.119/Newtgingrich/republicans/1d10ts has gotta be an error, surely?

The second entry in the cifs mount (line in fstab) should be a location in your openSUSE filesystem (see martin_helm’s post at post #4).

**Objective: **

Create permanent connection between openSUSE12.1 **KDE **32bit desktop to **Microsoft Server 2003 **through LAN using credentials file to provide user name and password to access Microsoft Server 2003

:~ # kwrite /etc/fstab

Code:

//255.255.255.255/MS2003sharename //smb://255.255.255.255/MS2003sharetopfolder/MS2003sharesubfolder/MS2003targetshare cifs credentials=/root/etc/.creds,_netdev 0 0

Save +close fstab

[size=4]Create credentials file

[/size]:~ # kwrite

Data entry:

username=OMITTED
password=NOTGIVEN

Save file as .creds in /root/etc

Close .creds -kwrite

Reboot

Open Terminal in Superuser

Code:

:~ # mount -a
error -1 (Unknown error -1) opening credential file /root/etc/.creds
:~ #

Instead of repeating your original information, did you even try to read the replies you got and understand from them what you did wrong?

On 2012-07-27 07:46, China Jobs wrote:
>
> It’s 2012 and I can take 6.25 minutes to breath, so lets try again.
>
> I am trying to mount (connect to) folders on my company server, at boot
> and have the user name & password handled by the credentials file so
> that I can open & save files as easily as if it was a local file. I
> have if you have read the post last year, tried just about everything,
> except moving the server into my office and using it as a box.

And you don’t even post a link to that…

>
> what I have done is…
>
> Opened Terminal in Super User mode kwrite /etc/fstab Added ther line
> below /etc/fstab. Saved & closed fstab opened a new file in kwrite
> wrote username=WorldTextingFederations (You get the idea) the next line
> is password=yeahsureyoubetcha Then saved the file in /etc as .creds
> Next I closed kwrite and exited Terminal
>
> Below are the lines EXACTLY (not really everyone seems to freak if you
> do put in the real IP, user, folder)

No, we don’t. Private IPs are no problem. Disguised data is no problem, as long as you tell us
that you disguised the data.

> /etc/fstab
>
> //192.168.18.119/Newtgingrich
> //smb://192.168.18.119/Newtgingrich/republicans/1d10ts cifs
> credentials=/root/etc/.creds,_netdev 0 0

Well, here we have a big problem.

You are not a new user (as you claim to have posted about this a year ago), so you should know
about code tags. The above text about fstab I don’t know how many lines it is! It should be
one, but you posted THREE. This can not work in fstab! Now don’t complain that the forum
software wrapped your lines, because it is your fault for not using code tags, and you knew it

  • you are not new here.

Another problem. You say in the text paragraph that you “saved the file in /etc as .creds”. But
in the fstab code you use “credentials=/root/etc/.creds” which is not the same file! How do you
expect that to work?

Then the mount point - but others have commented on that one already.

I will not comment on the rest, you get the idea.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On 2012-07-29 14:56, martin helm wrote:
>
> Instead of repeating your original information, did you even try to read
> the replies you got and understand from them what you did wrong?

And he refuses to use code tags :frowning:

His post is unreadable.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)