PDA

View Full Version : How do I mount a smbfs share as root?


ThunderFox
2006-03-28, 03:58 AM CST
I've tried to do the following while logged in as root:
mount -t smbfs //bimbo/backup /backup

and I get the following error messages:
14817: session setup failed: ERRDOS - ERRnoaccess (Access denied.)
SMB Connection failed


Now, what can I do about this? The share on the NT server is set to allow full access to administrators and domain admins and SAMBA is set up to match the user root = administrator in windoze.

Have I missed something? The strange is that if I log on as a user, type su and get root priviledges I can do the above mount without any errors...

The thing is that I would really like to know how I can force my fedora box to do the above network mount directly at startup and preferrably retry it once a day in case the NT server goes down.

Could someone please help?

jhetrick62
2006-03-28, 04:49 AM CST
Are you on FC5? If so, smbfs is no longer a supported file type. You need to mount it as cifs. See manual: man mount.cifs

Jeff

pparks1
2006-03-28, 07:49 AM CST
Thunderfox,

You need a little more on your command;
mount -t smbfs //server/share /mntpoint -o username=NT_User_Here

root in Linux is similar to Administrator in Windows, but they aren't in any way mapped to each other.

As jhetrick62 said, when you move to FC5, you have to use mount -t cifs or mount.cifs instead. However, you aren't using FC5 now as you would have received a different error message, one like smbfs (unknown file system).

ThunderFox
2006-03-29, 03:49 AM CST
Heeeey pparks1!!!

Thanks for the absolutely wonderful suggestion, it works!
And I did a little figuring by myself aswell and added %password = it does the mapping without asking any questions... Rock on baby! :D

jhetrick62: No, Fedora Core 4 x86, this is going to be a little file server for a small departement with about three users and they just want to forget about it being there, so no bleeding edge software(I suppose Fedora 5 is more bleeding edge than 4)...

And by the way...

Fedora is the first linux distro that really works for me = if I want to do things the hardcore way by editing all files by hand I can do that, but I still have all those nifty little gui-tools that let me do it the n00b way, fits me like a glove!

Hurray!