LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-11-2006, 12:47 AM   #1
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware14.2 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 3,404

Rep: Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996
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-11-2006 at 12:49 AM.
 
Old 01-11-2006, 05:35 AM   #2
migs
LQ Newbie
 
Registered: Nov 2005
Location: Manila, Philippines
Distribution: Slackware
Posts: 11

Rep: Reputation: 0
try this

Code:
chmod 04711 smbmnt
then try to mount it.

Last edited by migs; 01-11-2006 at 05:36 AM.
 
Old 01-11-2006, 03:38 PM   #3
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware14.2 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 3,404

Original Poster
Rep: Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996
Nope, still doesn't work
 
Old 01-11-2006, 05:32 PM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
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.
 
Old 01-11-2006, 05:47 PM   #5
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware14.2 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 3,404

Original Poster
Rep: Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996
No, it still doesn't work.
 
Old 01-11-2006, 06:18 PM   #6
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 31
as long as I know, you should su to root in order to mount samba shares. check out sudo
 
Old 01-11-2006, 06:28 PM   #7
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware14.2 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 3,404

Original Poster
Rep: Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996
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.
 
Old 01-11-2006, 08:40 PM   #8
soulestream
Member
 
Registered: Nov 2005
Posts: 183

Rep: Reputation: 30
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 08:43 PM.
 
Old 01-11-2006, 09:00 PM   #9
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware14.2 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 3,404

Original Poster
Rep: Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996
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 09:08 PM.
 
Old 01-11-2006, 11:00 PM   #10
soulestream
Member
 
Registered: Nov 2005
Posts: 183

Rep: Reputation: 30
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
 
Old 01-12-2006, 12:37 AM   #11
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware14.2 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 3,404

Original Poster
Rep: Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba Config not working setting up user shares. cogs_bobv Linux - Software 9 10-11-2005 09:58 PM
Mounting Samba Shares ad user hobz Linux - Software 1 06-17-2005 11:10 PM
Samba -- XP user can log in to shares but smbclient user always gets password errors ejoe Linux - Software 3 04-18-2005 11:55 AM
Linux can mount samba shares but not windows shares bindsocket Linux - Software 1 12-01-2003 06:28 PM
User Group and samba shares Sylhouette Linux - General 0 01-09-2002 04:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration