Vdubjunkie Posted February 8, 2004 Report Share Posted February 8, 2004 Hello all: Once again I've decided workarounds aren't good enough. Here is the scenario. I host the majority of my files on a MD 9.1 server distributed to my network via Samba 2.2.8. (I had the same problem in 2.2.7) I log in to my MD 9.1 workstation using YP/NIS. (I know it is using that since this user does not exist locally on the workstation). For all intensive purposes my UID/GID are the same. On my workstation I /sbin/mount.smbfs the share (since only root can mount!!). This user is the owner of all files and directories involved on the server, yet when I attempt to alter a file with any number of programs I am unable to. This has nothing to do with chmod as even a member of the group would have write priviliges to the folders/files. The only thing I think of now as I type this is perhaps a Samba option I have overlooked. Anybody with any help will be greatly appeciated. Quote Link to comment Share on other sites More sharing options...
kde-head Posted February 11, 2004 Report Share Posted February 11, 2004 " On my workstation I /sbin/mount.smbfs the share (since only root can mount!!)." that's strange - i can mount windows shares using my own non-root account via LinNeighbourhood. And the mount points appear in my home/mnt folder /home/kde-head/mnt/WINDOWS-PC/myshare_on_windows Quote Link to comment Share on other sites More sharing options...
Vdubjunkie Posted February 12, 2004 Author Report Share Posted February 12, 2004 (edited) that's strange - i can mount windows shares using my own non-root account via LinNeighbourhood. Yeah, I'm sorry. Sometimes I take it for granted that everybody knows I don't really use gui tools. Likely the command LinNeighbourhood is using is "/sbin/mount.smbfs" and not mount. One of the many reasons I don't like letting pretty graphical tools keeping me from knowing what I am trying to do. Big reason I left M$. Aside from that, does anybody have any ideas about my problem? I'm sure those who do know that the only way to really fix it will be cli, so I won't bother to specify that. Edited February 12, 2004 by Vdubjunkie Quote Link to comment Share on other sites More sharing options...
fred_the_fish Posted February 26, 2004 Report Share Posted February 26, 2004 The answer... should be relatively simple... I've just had to get around the same problem myself - I have a server box that has no x session (as its a server :P)... so I've had to learn command line. Anyway, as you stated, only root can mount things, therefore, it stands to reason that the mount will be WITH root rights. Reading the man pages, there is a nice little variable called uid :D... set this to the user(or gid (group id)... whichever is better for u) that you want to use the mounted filesystem with.. and hey presto, bobs your mothers brother... etc etc... - For my system i'd su -, and then do: [root@trefpc0110 /]# mount -t smbfs -o username=jez -o uid=jez //JEZ/sarah /home/jez/documents/mnt/pctrefjrg9/ just make sure that the directory your mounting too exists (but then, as you allready know how to mount, you'll know that :P) Anyway, I think thats what you wanted to sort isn't it - atleast, thats how I worked out how to do proper read/write samba access. As an asside, its also possible to auto-mount samba drives on boot - In order to mount a samba share from your fstab, put the following in /etc/fstab //smb4/cswr /mnt/drive smbfs defaults,user,credentials=/root/cred 0 0 You don't need to call the file /root/cred. Choose whatever fits your file structure. in /root/cred, you will need: username = yourusernamepassword = yourpasswordhere Now make sure that /root/cred is only readable by root. The premissions on /root/cred should be: drwxr-x--- 22 root root 4096 Nov 12 08:46 root-rw-r----- 1 root root 37 Jul 22 08:24 /root/cred Use chmod and chown to ensure this is so. Make sure that /mnt/drive (or wharever mountpoint you choose) exists, and issue: mount /mnt/mdrive Quote Link to comment Share on other sites More sharing options...
Gowator Posted February 26, 2004 Report Share Posted February 26, 2004 Or, as root add -o user in the fstab! Then the user can mount :D Quote Link to comment Share on other sites More sharing options...
aRTee Posted February 26, 2004 Report Share Posted February 26, 2004 On a side note, if you left MS behind, why use Samba and not NFS...??? Quote Link to comment Share on other sites More sharing options...
fred_the_fish Posted February 26, 2004 Report Share Posted February 26, 2004 However, that leads to security issues, and if you have servers etc, you don't want that in :D saying that, I guess its a security issue if users have to drop to root in-order to mount isn't it :lol Personally, I'd say its safer my way, and I'd then waste my time mounting drives for others all the time - hence the automount I added at the end there.... (though more long-winded....) Quote Link to comment Share on other sites More sharing options...
Gowator Posted February 26, 2004 Report Share Posted February 26, 2004 However, that leads to security issues, and if you have servers etc, you don't want that in :D saying that, I guess its a security issue if users have to drop to root in-order to mount isn't it :lol Personally, I'd say its safer my way, and I'd then waste my time mounting drives for others all the time - hence the automount I added at the end there.... (though more long-winded....) Which one leads to security issues? If its making it user mountable I don't see it. If its using NFS then ... its balances out. Presumably he is using CIFS becuase he want to connect to a windows network... Windows is a way bigger security problem than using NFS ..... I presume if he was worried about security he wouldn't be using Windows :D Hey, and welcome to the board. Your making me LOL already :D Quote Link to comment Share on other sites More sharing options...
fred_the_fish Posted February 26, 2004 Report Share Posted February 26, 2004 Cheers :D I was actually refering to NTFS and CIFS, yes... but hey.. if he wants to connect to a windows network, then...well... urrrr... he can still think about how to make it more secure :P - I have no option but to connect to some NTFS drives... but thats a legacy issue with my machine (as in XP is still sat there somewhere, and until I can get around to fighting Winex... when I want a meaningless thrash of some game.. it'll stay there... - realistically, that means "until a stable Raiser4 is realeased..." Quote Link to comment Share on other sites More sharing options...
Gowator Posted February 26, 2004 Report Share Posted February 26, 2004 Get a console :D I'm only half joking BTW .... I enjoy playing games and I enjoy configuring servers and usefull stuff but I loose interest messing about with WineX and games. i can just stick a DVD in the XBOX and ... well I spent 3 hours playing Star Wars tonight ....and in the interim time it sits there in Linux sticking up two fingers at bill :D More seriously, Im really glad I stopped messng about with Games becuase it allowed me to finally get rid of ALL windows. Then it forced me to iron out the last issues with linux that I'd kept rebooting into Windows for instead of fixing.... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.