1. Set smbmount SUID (chmod +s /usr/bin/smbmount).
or
2. I'm not sure if it worked but I remember trying to use /home/me/myshare instead of /mnt/myshare.
I'd like to be able to network share as a normal user instead of having to mount it as root.
Here's what I've tried so far after reading the man pages...
1. chmod 4766 /usr/bin/smbmnt
2. Added the following line in my /etc/fstab
//kos/e$ /mnt/kos smbfs noauto,user,username=administrator 0 0
* note that //kos/e$ is a partition on an NT box
This is not working as I'm getting permission errors. However, if I su to root, I can do the following
# mount -t smbfs -o username=administrator //kos/e$ /mnt/kos
After putting in the password for the administrator account, the share is mounted.
Hopefully someone hear can offer a solid way to get this done. Thanks in advance for any feedback
Best,
Adam
1. Set smbmount SUID (chmod +s /usr/bin/smbmount).
or
2. I'm not sure if it worked but I remember trying to use /home/me/myshare instead of /mnt/myshare.
you must set the suid flags on smbmnt and smbunmount (I think /sbin/ in redhat). Once that is done, you can mount shares as a non root user. No way around that.
Not sure about all distros, but I just mount Samba shares (on Windoze or LInux boxes) from /etc/fstab in Mandy and RedHat, like so:
//other_box/share_name /local_mnt_pt smbfs username=you_know_who,password=you_know_what,fmask =0777
Haven't tried adding the user option to the above line to enable the command
mount /local_mnt_pt
to work as user, but that might work. Let me know if it does.
Also, if you do the above, change the permission on /etc/fstab to 600 so the unwashed don't see your passwords.
Lol! I'm such a twit. up till now, I didn't know you could mount smb shares, I've been using smbclient all this time
This is great, mounting stuff will be so much better ;D
The thing is that the fstab entries are being done as root any how. Just an easier way for dedicated mounts. For those that use LinNeighborhood to mount stuff as needed, the suid way may be easier (no screwing with the fstab file).
Not sure about all distros, but I just mount Samba shares (on Windoze or LInux boxes) from /etc/fstab in Mandy and RedHat, like so:
//other_box/share_name /local_mnt_pt smbfs username=you_know_who,password=you_know_what,fmask =0777
Haven't tried adding the user option to the above line to enable the command
mount /local_mnt_pt
to work as user, but that might work. *Let me know if it does.
Also, if you do the above, change the permission on /etc/fstab to 600 so the unwashed don't see your passwords.
Works for me. Once the share is mounted, you can forget about it. On some machines, say the gateway/firewall to your LAN, you might not want to do that if you have been a target of hackers. But if you've been a favourite hackee, then you've got other issues to worry about.Lol! I'm such a twit. up till now, I didn't know you could mount smb shares, I've been using smbclient all this time
This is great, mounting stuff will be so much better ;D
Well, can't say I've ever been hackedOn some machines, say the gateway/firewall to your LAN, you might not want to do that if you have been a target of hackers. *But if you've been a favourite hackee, then you've got other issues to worry about.
I just love being able to mount it as opposed to having to use smbclient. It's so great to be able to manipulate files on the other box with the familiar (and powerful) GNU tools, instead of being cramped into the crippled ftp-like interface of smbclient. Lets put it this way: it's really nice to be able to copy over multiple files at once with one command![]()
I'm on your team...
Well, can't say I've ever been hacked
I just love being able to mount it as opposed to having to use smbclient. It's so great to be able to manipulate files on the other box with the familiar (and powerful) GNU tools, instead of being cramped into the crippled ftp-like interface of smbclient. Lets put it this way: it's really nice to be able to copy over multiple files at once with one command![]()
![]()
thanks to everyone for all the help. I was finally able to do this by following these steps
chmod +s /usr/bin/smbmnt /usr/bin/smbmount
mkdir ~/mnt
added this line to /etc/fstab
//server/share /home/me/mnt smbfs rw,noauto,user 0 0
so now I'm able to mount it in a subdir within my home directory
Bookmarks