Newsgroups: gmane.linux.distributions.grml.user Date: Thu, 26 Oct 2006 12:16:14 +0200
> grml-rebuildfstab executes '"rebuildfstab -v -r -u $fstabuser -g > $fstabuser'" where $fstabuser is the user with the UID 1000.
> Is this UID 1000, GID 1000 configurable somewhere?
Not yet.
If you want to adjust the alias for your needs just redefine the alias via ~/.zshrc.local or /etc/zsh/zshrc.local.
But I'll think about it whether we can use a less static version.
mika
> thanks, I hope we can do it in /etc/grml/autoconfig, we have CONFIG_FSTAB > already at least.
This is what I'm planning to do, yes. (Needs detailed design though because of the several places where rebuildfstab is used.)
mika
> >> >> Is this UID 1000, GID 1000 configurable somewhere?
> >> Hm.., how is rebuildfstab called when new device is plugged in? It > >> should not be a alias, should it?
> > man rebuildfstab
> Done in /etc/udev/grml_usbdev.rules?
Yes, activated via /etc/udev/rules.d/z31_grml_usbdev.rules
mika
>> I saw in the script that it uses "-g users", which is 100 in my system, >> but why files show up as group id 1000? ... > > Please show the entry for the device in /etc/fstab where the above > files are hanging around, plus the corresponding "mount"-output.
$ tail -3 /var/log/messages Oct 27 10:02:26 cxmr kernel: sd 3:0:0:0: Attached scsi removable disk sdb Oct 27 10:02:28 cxmr rebuildfstab[6704]: re-generating /etc/fstab - see 'man rebuildfstab' Oct 27 10:02:33 cxmr rebuildfstab[7051]: re-generating /etc/fstab - see 'man rebuildfstab'
$ grep /mnt/usb-sd /etc/fstab /dev/usb-sdb /mnt/usb-sdb auto user,noauto,nodev,noatime,nosuid,noexec,rw,uid=1000,gid=1000 0 0 /dev/usb-sdb1 /mnt/usb-sdb1 auto user,noauto,nodev,noatime,nosuid,noexec,rw,uid=1000,gid=1000 0 0
% mount /mnt/usb-sdb1
$ ls -l /mnt/usb-sdb1 total 16 drwxr-xr-x 3 1000 1000 16384 2006-04-23 dcim/
$ apt-cache policy grml-rebuildfstab grml-rebuildfstab: Installed: 0.3-12 Candidate: 0.3-12 Version table: *** 0.3-12 0 683 http://grml.org ./ Packages 100 /var/lib/dpkg/status
mika
> grml-rebuildfstab: > Installed: 0.3-12
Ok. Is the entry OK if you manually run:
# rebuildfstab -v -r -u $USER -g $GROUP
and replace $USER with your username and $GROUP with the groupname of your user?
> Further question, why is rebuildfstab called twice?
Because the udev-rule KERNEL=="sd[a-z]*" matches the disk *and* each of its partitions. Thinking about it, "sd[a-z]" should be OK as well.
mika