Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> New Problem: Can Mount Smbshares, Can't Unmount
shaggy999
post Feb 12 2004, 12:38 AM
Post #1


Grub-er
**

Group: Members
Posts: 27
Joined: 18-January 04
Member No.: 2,170



Ok, so thanks to some help here I can get back into my operating systems. biggrin.gif

Anyway, for today I decided that I would attempt to get shares mounted in Linux and I got halfway there.

I su'd and created a folder /mnt/leviathan as root. Permissions are:
drwxr-xr-x 2 root root 4096 Feb 11 21:13 leviathan

Those are the same permissions settings as the default /floppy and /cdrom folders.

Then I set smbmnt (not smbmount) chmod g+s.

Then I went into /etc/fstab and added this line:
//leviathan/data /mnt/leviathan smb user,owner,username=user,password=pass 1 2

Now initially I could not do: mount /mnt/leviathan. I would get the following error message:
cannot mount on /mnt/leviathan: Operation not permitted
smbmnt failed: 1

But if I do chown brandon:brandon /mnt/leviathan as root and then exit out of su and do the same command it works! So that's the first kind of problem I have.

The second is that I can unmount the drive as me, but only by doing smbumount /mnt/leviathan (I did chmod g+s for smbumount). I cannot get the same effect for the umount command if I give it chmod g+s.

Basically what I can/can't do and what I want changed:
folder a share is mounted in must be chown me:me (bad, would rather have same as floppy/CD-ROM)
mount command: mount /mnt/leviathan (good)
unmount command smbumount /mnt/leviathan (bad, prefer umount /mnt/leviathan)

My assumption is that because I have to do do the chown for me and it becomes inconsistent w/ the permissions on the floppy/cd-rom folders that I must be doing something wrong. Same goes for the umount command.

Any ideas?
Go to the top of the page
 
+Quote Post
hughesjr
post Feb 12 2004, 08:03 AM
Post #2


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



I don't normally mount smb shares in fstab .... but create mount scripts instead...although either way should work. (I never put usernames and passwords in major system files like fstab ... that is the first place people who break into your computer look to see if they can harvest passwords. It is a little harder to look for passwords in other scripts).

Anyway, the command to mount smb shares in fstab is (i think) this:

//leviathan/data /mnt/leviathan smbfs users,owner,username=user%pass 1 2

but a command line that would work is this:

mount -t smbfs -o username=user,password=pass //leviathan/data /mnt/leviathan

the unmount command should be:

umount /mnt/leviathan

if you can't unmount, you can figure out the process that is open on that partiton with this command:

fuser -m /mnt/leviathan


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 23rd October 2017 - 03:57 PM