Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Mounting a standard user, windows share at login Post 302578492 by Corona688 on Thursday 1st of December 2011 04:31:17 PM
Old 12-01-2011
You need to have CAP_SYS_ADMIN privileges to mount something, period, end of story, no exceptions.

The 'user' option in /etc/fstab works because /bin/mount is a setuid executable, always running as root. It must check whether you're allowed to mount anything by itself, and checks against /etc/fstab, a file only modifiable by root.

gnome gets away with it by installing hooks into PAM to give it lots of permissions you're probably unaware of. It definitely needed root to install all those.

autofs gets away with it by running a system daemon with root permissions that mounts things for you. Naturally to install it you need root.

If you find any way to mount a filesystem without needing root's authority to configure or install anything, that is a bug and should be fixed.

---------- Post updated at 03:31 PM ---------- Previous update was at 03:29 PM ----------

Quote:
Originally Posted by metallica1973
Was wondering about using the noauto option. If this is used will it still mount the drive after the boot automatically, or would i still have to mount the share after login manually?
It won't mount automatically, no.

It won't hang the system if it doesn't work, either.

I'd put @reboot /bin/mount /path/to/mountpoint in your user crontab instead, or perhaps /bin/mount /path/to/mountpoint in /etc/local.start instead if I wanted it to not depend on any user. It won't halt the boot process if mount fails in those places.
This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

Mounting a windows share on AIX

Hi, How can I mount a Windows share (over samba) on an AIX machine? I know there is a utility called smbmount on Linux, but alas, I cannot find out how to the same thing on AIX. anyone have any ideas? thanks! (3 Replies)
Discussion started by: szahir1
3 Replies

2. Solaris

Mounting CIFS share

Is it possible to mount a samba share on a solaris system? I know this is possible with Linux using a fstype of smbfs. I am trying to aviod having to share the same directories via cifs and nfs on a solaris box to windows and solaris clients. (3 Replies)
Discussion started by: mhm4
3 Replies

3. UNIX for Advanced & Expert Users

Help mounting Windows share in UNIX

We recently upgraded one of our engineering servers, and now the lone UNIX box that houses older CAD files can not connect to it. I have tried every variation of mount I can find, but to no avail. Help is appreciated. Here are the specs: Server: Windows 2003 x64 with Unix Services for Windows... (8 Replies)
Discussion started by: shatterstorm
8 Replies

4. IP Networking

Problem Mounting NFS share

I have one machine "The server" ip: 192.168.1.1, it runs ubu 8.04(LTS) and - I have a folder (/shareme) that I want to share with other linux machines on my LAN. - The server runs NFS server and common and portmap and so do the other machines on my LAN. - The server has the export file with the... (2 Replies)
Discussion started by: fcron
2 Replies

5. Solaris

mounting windows share folder

please help me,,i need step to mount windows share folder,,i try samba and nfs and it didnt work (in my linux server the command is fine),,can somenone give me an example for this to be done? (0 Replies)
Discussion started by: Cellscript
0 Replies

6. Shell Programming and Scripting

Script to copy User home folders to mounted windows share

First of all, let me state that I am a windows admin. I have a windows share mounted to /mnt/server I need a script that will either login as sudo or perform commands with sudo rights. I need the script to copy all of the users /home folders to the mounted windows share. Now If I can... (7 Replies)
Discussion started by: EricM
7 Replies

7. HP-UX

user can't write on cifs share but OK with Windows Explorer

Share ServerA ==== The Samba server is running on Samba version 3.0.22 based HP CIFS Server A.02.03.04 /opt/cifsclient/sbin/cifsclientd version: HP CIFS Client - Version A.02.02.02 smb file: My previous casw was thew user wasn't able to write to the share from Windows... (1 Reply)
Discussion started by: lamoul
1 Replies

8. UNIX for Dummies Questions & Answers

[Solved] error while mounting windows share on linux

Hi whan i am trying to mount a windows share on linux i received the following error can some one help me with thsi # mount -t cifs \\\\servername\testdata -o username=xw27,password=*es*feed /test Mounting the DFS root for a particular server not implemented yet No ip address specified... (5 Replies)
Discussion started by: robo
5 Replies

9. UNIX for Beginners Questions & Answers

Mounting Windows Share to Linux Server

Hi Folks - I need to mount a Windows Share to a Linux server. What is the best/easiest way to do this? Is this 'how-to' guide accurate: How to Share Files Between Windows and Linux Or is there a better method you could share? Thanks! (8 Replies)
Discussion started by: SIMMS7400
8 Replies

10. UNIX for Advanced & Expert Users

Mounting a samba share

Hi, I need to mount a directory from a Windows server to a CentOS box. The Windows server used is Windows Server 2003, and the path to the directory that I want to mount on CentOS is C:\Tomcat6\webapps\NASApp\logs. I am not sure of the correct way to mount this on CentOS, as most of the... (2 Replies)
Discussion started by: anaigini45
2 Replies
USERMOUNT(1)						      General Commands Manual						      USERMOUNT(1)

NAME
usermount - A graphical tool to mount, unmount and format filesystems. SYNOPSIS
usermount [ options ] DESCRIPTION
usermount is a graphical tool to allow users to easily manage removable media, such as floppy disks or zip disks. When the tool starts up, it scans /etc/fstab for all filesystems that have been configured to allow users to mount and unmount them. The filesystem can be mounted or unmounted by pressing the toggle button labeled Mount. Also, if the user has the appropriate permissions for the device, the Format button will be active. This allows the user to format disks using fdformat and create a new filesystem of the type listed (using mkfs with the appropriate option). Naturally, the user will be prompted for confirmation before actually destroying data on the device. Note that if a device is already mounted, the format button is inactive for all entries that share the same device. When run as root, usermount displays all of the entries in /etc/fstab rather than just the ones with the user option. OPTIONS
This program has no command line options of it's own, but it does take the standard X program options like -display and such. See the X(1) man page for some of the common options. FILES
/etc/fstab The system file describing the mountable filesystems. SEE ALSO
mount(8), fdformat(8), mkfs(8), fstab(5) X(1) BUGS
Mount entries with a filesystem type of iso9660 are outright considered CD-ROMs and the format button is always disabled. Mount entries for swap files or partitions are also ignored. A nice feature might be to allow root to turn swap on and off for swap parti- tions. AUTHOR
Otto Hammersmith <otto@redhat.com> Red Hat Software 3 October 1997 USERMOUNT(1)
All times are GMT -4. The time now is 07:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy