Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-10-2006, 11:47 PM
|
#1
|
Senior Member
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,292
|
Another attempt to get user rw privileges for samba shares
Well, I took a look at this thread http://www.linuxquestions.org/linux/...k_File_Sharing, and followed it's instructions, and I restarted, and my samba share got mounted, woohoo, however, I still don't have rw privileges as a normal users, and also, I unmounted it successfully, as a normal user, but when tried to mount it again, I got another error message stating..
Code:
slackuser@slacker:~$ mount /mnt/network
libsmb based programs must *NOT* be setuid root.
336: Connection to minamoto failed
SMB connection failed
slackuser@slacker:~$ mount //minamoto/files
libsmb based programs must *NOT* be setuid root.
338: Connection to minamoto failed
SMB connection failed
And so this is what my fstab looks like.. What should I do, in order to get a normal user to be able to mount, and rw to it without having to su to root?
Code:
//minamoto/files /mnt/network smbfs credentials=/home/slackuser/.smbmnt,rw,users,umask=000 0 0
Last edited by Jeebizz; 01-10-2006 at 11:49 PM.
|
|
|
01-11-2006, 04:35 AM
|
#2
|
LQ Newbie
Registered: Nov 2005
Location: Manila, Philippines
Distribution: Slackware
Posts: 11
Rep:
|
try this
then try to mount it.
Last edited by migs; 01-11-2006 at 04:36 AM.
|
|
|
01-11-2006, 02:38 PM
|
#3
|
Senior Member
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,292
Original Poster
|
Nope, still doesn't work
|
|
|
01-11-2006, 04:32 PM
|
#4
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
The following is copy/pasted from http://my.brandeis.edu/bboard/q-and-...?msg_id=0002y2:
Quote:
PROBLEM SOLVED! Here're the details (archived someplace, I hope, in case I
ever have to look them up again).
The final working /etc/fstab entry is:
//unethome/UNETNAME /home/LOCALNAME/unetdir smbfs
noauto,users,workgroup=USERS,username=UNETNAME,uid=nnn,gid=nnn 0 0
It might work with the username=USERS\UNETNAME format but specifying
"workgroup=" explicitly is working so I'm not going to try another change.
When I only had option "user" the user could mount but not umount. Using
option "users" (with an s) let's the user mount AND umount. (See details
below.)
The various permission errors (mount, smbmnt, smbmount, the "libsmb ..
must not be SUID" error, etc.) were fixed as follows:
-rwsr-xr-x 1 root root 68508 Sep 25 2003 /bin/mount
-rwsr-sr-x 1 root root 30816 Sep 25 2003 /bin/umount
-rwsr-xr-x 1 root root 9824 Feb 11 13:57 /usr/bin/smbmnt
-rwxr-xr-x 1 root root 665944 Feb 11 13:57 /usr/bin/smbmount
-rwxr-xr-x 1 root root 7424 Feb 11 13:57 /usr/bin/smbumount
mount, umount and smbmnt are "s"; smbmount and smbumount are NOT "s".
The user can now "mount unetdir/ " successfully. ("mount //unethome/UNETNAME" also works.) To umount, "umount unetdir/ " gives an error about multiple mounts (as shown in /etc/mtab) but when "umount //unethome/UNETNAME " is used
|
Hope it does the trick.
|
|
|
01-11-2006, 04:47 PM
|
#5
|
Senior Member
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,292
Original Poster
|
No, it still doesn't work. 
|
|
|
01-11-2006, 05:18 PM
|
#6
|
Member
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816
Rep:
|
as long as I know, you should su to root in order to mount samba shares. check out sudo
|
|
|
01-11-2006, 05:28 PM
|
#7
|
Senior Member
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,292
Original Poster
|
I've always been doing that, but its more of a hassle, and I want not only to be able to mount a samba share as a normal user, but also write to a samba share as a normal user, not as root/sudo.
|
|
|
01-11-2006, 07:40 PM
|
#8
|
Member
Registered: Nov 2005
Posts: 183
Rep:
|
umask doesnt work the same way on samba as it does other file systems.
umask=000 on samba is ---
remove the umask and change it to
//server/share /mnt/network smbfs credentials=/pathto,rw,users,fmask=0777,dmask=0777 0 0
i think you can just use umask=777, but i always do it the above way.
unmount the volume and remount it
sorry i just saw the normal user thing
with "users" any user should be able to mount / unmount the fmask/dmask will give all users rwx
soule
Last edited by soulestream; 01-11-2006 at 07:43 PM.
|
|
|
01-11-2006, 08:00 PM
|
#9
|
Senior Member
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,292
Original Poster
|
Ok, well I made the following changes, after I unmounted the SMB share..
Code:
//minamoto/files /mnt/network smbfs users,rw,credentials=/home/slackuser/.smbmnt,fmask=0777,dmask=0777 0 0
Still nothing...
Code:
slackuser@slacker:~$ mount //minamoto/files
libsmb based programs must *NOT* be setuid root.
1574: Connection to minamoto failed
SMB connection failed
slackuser@slacker:~$
[edit]
However, as soon as I mount the share as root, I CAN now read and write to it as a normal user, why can't I mount it as a normal user still? 
Last edited by Jeebizz; 01-11-2006 at 08:08 PM.
|
|
|
01-11-2006, 10:00 PM
|
#10
|
Member
Registered: Nov 2005
Posts: 183
Rep:
|
i think you best bet is going to be use sudo to mount with as a regular user
or do what i do and just put it in /etc/fstab and let it automount at boot up
I have been chmod'ing everything i can think of and nothing.
chmod u+s, usually works. its either a slack thing (which i doubt) or its a samba thing (which is possible)
soule
|
|
|
01-11-2006, 11:37 PM
|
#11
|
Senior Member
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,292
Original Poster
|
Yea you're right, I am leaving it up to fstab, so that works, glad that I can at least write to a SMB share without having to su to root now.
|
|
|
All times are GMT -5. The time now is 12:30 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|