Ubuntu :: Auto Run (auto Exec) A Script On Mounting A Device?
Mar 16, 2010
I would like to exec a script whenever a user mount a device. The device could be an internal device (for example a partition on a second hard disk) or a removable one (for example a usb hard disk). The script must have sudo capabilities even if the user is not included in the admin group. Is it possible?
The specific question:
I would like to add acl option to a device whenever it is mounted.
I tried fstab but it's changing the behaviour of nautilus see:
[URL]... so I would like to create a script with the command
Code:
sudo mount -o remount,acl /media/data
and auto execute it any time data is mounted.
View 1 Replies
ADVERTISEMENT
Feb 21, 2010
I have a 500 GB ext4 formatted HHD which i have to manualy mount when ubuntu starts. I have read much on the topic but am still unsure what i should add to fstabmy output when entering "sudo fdisk -l" is
"Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
[code]....
View 7 Replies
View Related
Jul 10, 2011
I have one of those lovely Western Digital external hard drives and it seems to have an UDF "partition" on the hard drive itself. I cannot format it, remove it from the hard drive itself, or disabling the UDF seems to be a no go once its popped into a Linux distribution of any kind.
So my question is, is it possible to stop the UDF from even auto mounting at all?
System
Ubuntu 10.10 Maverick Meerkat
View 2 Replies
View Related
Jan 6, 2011
I recently installed 32bit maverick and wanted to make it login automatically. I tried enabling auto login from Admin > Login but that didnt work and I was still prompted for my password. Then I went to Users & Groups and changed the password option to Do Not ask for password at login now after I reboot, the user list is shown (only 1 user) and it doesnt ask for password after I click on my username.
However, then it gives a few errors (as i vaguely recall):
1. cannot load .ICE directory in my home directory
2. some error 256 about a gconf-sanity-2 file
3. nautilus cannot load my home directory etc
and then it gets stuck without loading anything (blank wallpaper). i ve tried navigating to my home directory using Alt F2, gksudo nautilus and my home dir contents are encrypted by the ecryptfs (there is a readme.txt file and a shortcut). i have tried to decrypt but it doesnt work... i ve also tried to start/stop gdm, and startx but nothing works. if i stop gdm, then the prompt doesnt recognize my password and keeps on rejecting the commands i enter... I think this has something to do with the home dir not being decrypted due to the dont ask for paswd option... how can i disable the dont ask for pwd without the gui (i can access my / by booting through an external usb).
View 4 Replies
View Related
Jan 13, 2010
I thought I'd format my new 2tb drive to ext4, so did that, created a mount point, chown'd it, edited fstab, and now it gives me this:
Code:
neur0m4ncer@box:~$ sudo mount -a
mount: special device /dev/sde1 does not exist
[code]....
View 3 Replies
View Related
Jan 16, 2010
I currently run a Windows XP virtual machine (using VirtualBox) so that I can use iTunes. This is fine, and I have set up a USB device filter which allows me to use my iPod, and update it via iTunes on the VM. However, this only works sometimes. I think the reason is that the VM sometimes can't get access to the iPod because it's mounted in Ubuntu - I think it may just be a race for who can mount it first - Ubuntu or the VM, when I plug it in. Is there a way I can prevent the iPod from automounting in Ubuntu so this problem (hopefully) won't arise?
View 2 Replies
View Related
May 3, 2010
I have my "documents" folder pointing to a Samba share on a 9.10 server. (Client is 64 bit 9.10). In /etc/fstab I have
Code:
//192.168.20.102/sean/Documents /home/sean/Documents cifs credentials=/home/sean/.smbcredentials,uid=1000,gid=1000
This always used to mount automatically and has suddenly stopped. Same result if I use smbfs instead of cifs. I have worked around this by adding noauto and then mounting it in /etc/rc.local.
Anyone else had this and fixed it so that the share mounts at boot rather than login. I do have some cron tasks that require this to be mounted and assume they will fail unless I login immediately after a reboot.
View 1 Replies
View Related
May 4, 2010
Enviroment:
-server ubuntu 9.04 with samba
-client fresh ubuntu 10.04
ubuntu is not auto-mounting samba shares. Old 9.04 done it without a problem. I need to type sudo mount -a to have samba mounted.
fstab:
//192.168.1.101/www /mokonawww cifs auto,iocharset=utf8 0 0
ls -l
drwxrwxrwx 25 root root 0 2010-05-03 17:44 mokonawww
Tested with diffrent parameters. And another problem also with samba shares, when I edit file from editor (eclipse) after save i got 'file changed dialog'. seems like file is written with some delay ? and timestamp dont agree (its my blind quess). On 9.04 no problems. Tested with 2 instances of Eclipse. One copied from 9.04 and second fresh install. Other editors raport the same problem. Its anoying as hell.
View 3 Replies
View Related
Apr 28, 2010
Does anyone else have this problem. Came just after recent update and is highly annoying. Plug usb device in and it is recognized on lsusb but not mounting and appearing in media folder. How do I solve this. Searched the forum but nothing useful
View 10 Replies
View Related
Feb 20, 2010
Does anyone know if there's a way to make nano support auto-complete and auto-bracket closing?
View 1 Replies
View Related
Apr 22, 2011
I code primarily in jQuery/JavaScript, and I'm looking for a text editor for Linux that has auto-indent and auto-outdent (seems to be tough to find that). Any suggestions? I've checked Gedit, Cream, vim, Bluefish.None of them seem to have this feature.
View 2 Replies
View Related
Feb 3, 2011
I have noticed that a common issue to several distros is the fact that the networking subsystem doesn't automatically detect the link if an ethernet connection is disconnected and then re-connected to the NIC after boot. If the ethernet cable is connected after the system is up and running, nothing happens - ethtool eth0 shows link detected: no, and you have to restart the network service to let the NIC know that there is in fact a link, and actually connect. I have a Fedora14 (KDE) box with a brand new Asus motherboard with embedded NIC. Everything works great except the auto-detect of a freshly connected ethernet connection if the link is down to begin with.
Am I missing a ethernet link sentinel utility or something, or is this just the way linux works? I have done plenty of research on plenty of posts, and it seems this is a common problem, with no solution other than manually or programatically restarting the network service in a script to detect the link after a disconnect.
View 3 Replies
View Related
Apr 30, 2011
I have upgraded to 11.04 today and I have hit a slight snag. In 10.10, I had it setup so that it would run a custom script when an audio CD was inserted into the DVD drive. The CD would mount regardless of whether the screen was locked or not. Since upgrading to 11.04, the CD will only mount when the screen is unlocked.Whilst I can appreciate the security benefits of this (if it is indeed intended and not a bug), is there a way to be able to enable discs to be mounted automatically, whether the screen is locked or not
View 1 Replies
View Related
Jul 16, 2009
I want to disable automounting of removable media such as anything on USB, memory cards, and even eSATA. I do want the device node to be set up, but that's it.
View 3 Replies
View Related
Jun 3, 2010
I press On-button, Debian boots, logs in and automatically connects to the Wireless network AND! to my local pc via LAN. It runs an ssh server, so I can ssh into debian over internet and communicate with the local pc (send a magic packet).Here are my problems:
1) I don't how to log in automatically. This and this doesn't work.
2) I need a network tool that can manage multiple connections and has a reconnect feature. With the default network manager I cannot even connect to more than one network simultaneously although I have two network devices of course.
And I guess I can run all that in console mode, right?
View 10 Replies
View Related
Jul 23, 2010
I recently installed a server with Software RAID. I tested by powering it down, unplugging one drive and powering it up. Magically, it worked!I found out later that I have to manually add individual devices like md1 to sda2 md2 to sda4. I got all of them added and rebuilt but my question is: Is there a way to make it so that if I "removed" a drive and put it back, the system will senses the new drive and rebuilds based on some internal table?
View 1 Replies
View Related
Aug 10, 2009
I have a fresh installation of Fedora 11 and I am having a hard time figuring out how to automount my storage drives. Each time I login, I try to access my various storage drives and gnome makes me authenticate asroot before mounting it. FSTAB lists only logical volumes but not my storage drives. What can I do to make sure these automount when I login?
View 3 Replies
View Related
Sep 16, 2010
I know this problem was mentioned here before but because I could not find a straight forward solution anywhere I am reposting this here. So here goes.As of today, my Fedora 13 64-bit has ceased to auto-mount USB drives completely. I have made absolutely no changes to the system and I am completely baffled and frustrated by this sudden development. I desperately need this system to function properly as I use it for school and this really put a wrench in my works, especially since I have done nothing to cause this. I assume that one of the many recent updates that have been released must have done this, but I have absolutely no idea how to fix this. Why do Fedora developers release updates that cripple a perfectly functioning system is beyond me and crap like this really makes me consider switching back to Ubuntu.
View 9 Replies
View Related
Apr 14, 2011
I boot several Redhat based distributions, Fedora 15, Fedora 14, CentOS, Scientific Linux, Redhat and occasionally something non-Redhat based like Ubuntu and Debian. Out of habit and preference I frequently set up partitions to be auto mounted at boot through fstab. Somewhere in time something went seriously wrong with the CentOS install. There are a ton of permission denied errors while booting CentOS (text style boot) mostly regarding shared libraries. The system will boot to the desktop and everything looks OK but some things don't work. I can't update the system because I have no network connection. I obviously can't get to the Internet or get e-mail. I can open a VT but can't log in as regular user or root.
Permission denied in both instances. I didn't make any drastic changes to the CentOS system, just minor tweaks. The culprit in my opinion is a combination of the fact that one of the other Linux systems did an SELinux relabel while booting and the CentOS partition was already mounted. Since the CentOS partition was mounted it too was relabeled. I can't prove this. If there's a way to prove it then I just don't have the skills or knowledge to do so. It's basically a theory based on what I know I've done with the several installed distributions. This is not a rant nor is it a request for help. Just a comment. An assumption, hopefully a correct assumption. The CentOS install was working flawlessly until something happened and I think that something was the SELinux relabel.
View 6 Replies
View Related
Feb 15, 2011
USB Flash drive appearing in GParted but not auto mounting
GParted Screenshot:-
View 9 Replies
View Related
Sep 11, 2010
my opensuse is not auto mounting USB drives anymore. It was working a few weeks ago! I have an external 500GB HDD and also an 16GB Kingston USB flash disk, both are not being auto mounted.If i do lsusb i get
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 006: ID 0930:6545 Toshiba Corp. Kingston DataTraveler 2.0 Stick (4GB) / PNY Attache 4GB Stick
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[code]....
View 9 Replies
View Related
Jan 26, 2010
I've recently installed Arch on my main PC, and I decided to use Xfce4 desktop environment as appose to gnome that I use on my laptop. Firstly, I had to search round for an icon theme to get any of the icons working (they were all just papers with red crosses in them to start with), which I think is taking lightweight a bit too far :P, but just my opinion.Now i've got that sorted I turned to the problem of auto-mounting partitions. I'm having some trouble getting HAL to auto-mount my NTFS partitions which have my documents and music on. They are NTFS because i've got dual boot windows, and had windows before Archlinux so NTFS was the logical fs type to use. I think HAL is auto mounting dvd's etc. (can't be sure as I aren't in Arch at the minute)I can mount the NTFS partitions manually using:mount -t ntfs /dev/sda(number from 1 through 3) /mnt/sda(1 through 3)
However, I can only access this via root, so I carried out: mchmod scott.scott /mnt/sda(1-3)or something similar and that works fine, so I know they can be mounted successfully. I've tried auto-mounting them using fstab but can't seem to get this working, and I would rather not have fstab auto-mount them, I would rather let HAL sort all that out for me.I have checked that dbus, hal, consolekit and xf86-input-evdev are all installed (although im not sure what xf86-input-evdev does).Has anyone got any ideas why its not auto-mounting the NTFS partitions. My laptop mounts the NTFS windows partition fine using gnome.
View 6 Replies
View Related
Apr 30, 2010
i am using ubuntu 8.04 and i am facing a problem of mounting external pen drive, exernal harddisk or even other /dev/ partitions in my login mount is not working so i manually mount the partition by mount command .. but i dont know how i can resolve this problem ...
fdisk -l currently returns as
Disk /dev/sda: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders
[code]...
View 1 Replies
View Related
Nov 6, 2010
maybe not so simple as what the subject saysBackgroun storyI have a couple of encrypted hard drives created with cryptsetup
I have the following lines in my /etc/crypttab
data1 UUID=someUUID none noauto
data2 UUID=someotherUUID none noauto
[code]...
View 1 Replies
View Related
Nov 26, 2009
I would like a USB thumb drive to be automatically mounted whenever I insert the drive into my PC (previously I had been mounting it manually with the 'mount' command). I gave the USB drive a unique label with e2label. I added an entry for it in /etc/fstab. This works in the sense that if I run "mount -a", the drive will be mounted. However, it still isn't completely automatic. Am I missing something? What else do I need to do?
View 8 Replies
View Related
Dec 23, 2010
Whenever I mount any of the ntfs volumes, instead of opening the volume, Rhythmbox starts automatically and scans volume for media files. It has nothing to do with media files as it starts even when there is no media file in the volume.
View 2 Replies
View Related
May 10, 2011
Current when my NTFS external drive is auto mounted, I can't run any executables from it.
If I unmount it and then manually do:
sudo mkdir /media/portable
sudo ntfs-3g /dev/sdc1 /media/portable
it works fine. Is there a way to make the auto-mount have "full" access so I can run applications from it?
View 2 Replies
View Related
Feb 1, 2011
how to mount a shared folder (on virtual box 4.0.0) on a win 7 host onto my ubuntu 10.10 virtualbox......i know how to mount the folders manually..i want the system to mount it every time i log in........Manual mount: mount -t vboxsf D_Drive /home/asd/Desktop/Sharedi tried using /etc/fstab but i didn't know what to put in the right fields......
View 2 Replies
View Related
Feb 18, 2016
I'm not sure how to do this. I checked the hard drive preferences and looked through the forums... I don't want to manually mount my hard drives(s) every time I boot up just to access my music and wallpapers.
View 5 Replies
View Related
Jul 13, 2010
how to stop gnome in fedora 13 from automounting the cdroms i insert? i just want it to ignore them.
View 4 Replies
View Related