vermaden / automount

Simple devd(8) based automounter for FreeBSD
66 stars 20 forks source link

id: vermaden: no such user … chown: vermaden: illegal user name #22

Closed grahamperrin closed 3 years ago

grahamperrin commented 3 years ago

Apologies for the poor quality of this photograph:

image

The messages appear when a OnePlus 2 (Android handset) is on USB whilst starting FreeBSD.

Are they associated with https://github.com/vermaden/automount/?

@vermaden I vaguely recall corresponding with you about this long ago – maybe more than two years – but I can no longer find my record of the context. (I deleted my Twitter account … wonder whether it was there.)

If I recall correctly:

Side notes:

  1. I see your https://github.com/helloSystem/ISO/issues/118#issuecomment-770456823 re: MTP – understood
  2. long after taking the photograph, whilst drafting this issue, when I made a physical connection to the device, a crash of bsdisks occurred – https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253149#c0
vermaden commented 3 years ago

What are the contents of your /usr/local/etc/automount.conf file?

grahamperrin commented 3 years ago

Ah, probably something you helped me with in or shortly before February 2019:

% ls -hl /usr/local/etc/automount.conf
-rw-r--r--  1 root  wheel   126B 16 Feb  2019 /usr/local/etc/automount.conf
% cat /usr/local/etc/automount.conf
USERUMOUNT=YES
ATIME=NO
REMOVEDIRS=YES
FM="caja --browser --no-desktop"
USER=vermaden
ENCODING=pl_PL.ISO8859-2
CODEPAGE=cp852
% 

The likely explanation is that I followed the I N S T A L L steps at https://github.com/vermaden/automount#readme and gained a copy of this 2018 revision of the file:

https://github.com/vermaden/automount/blob/78cc52d36effb8252577817fd271797190b5b5bc/automount.conf

Still, I'm confused:

% automount --help
automount: illegal option -- -
usage: automount [-D name=value][-o opts][-Lcfuv]
% 

From https://www.freebsd.org/cgi/man.cgi?query=automount&sektion=8&manpath=FreeBSD+12.2-RELEASE it seems that automount (a different automount?) is integral to the OS.

vermaden commented 3 years ago

From man automount page:

HISTORY
     The automount command appeared in FreeBSD 10.1.

Yes there is also automount (added later then mine automount) in the base:

% which automount
/usr/sbin/automount

% /usr/sbin/automount --help
automount: illegal option -- -
usage: automount [-D name=value][-o opts][-Lcfuv]

It has nothing to do with mine automount - which is here:

% /usr/local/sbin/automount --help | head -1
AUTOMOUNT is a devd(8) based automounter for FreeBSD.

Hope that helps.

Regards.

vermaden commented 3 years ago

USER=vermaden

You have user vermaden defined in the /usr/local/etc/automount.conf file so automount tries to use it.

Change it to your user.

Regards.

grahamperrin commented 3 years ago

Thanks!

If I want to work for a while without sysutils/automount but not remove it, is it enough to rename /usr/local/etc/devd/automount_devd.conf and then restart devd?

root@mowa219-gjp4-8570p:~ # cat /usr/local/etc/automount.conf
USERUMOUNT=YES
ATIME=NO
REMOVEDIRS=YES
FM="dolphin"
USER=grahamperrin
root@mowa219-gjp4-8570p:~ # ls -hl /usr/local/etc/devd
total 18
-rw-r--r--  1 root  wheel   323B Feb 16  2019 automount_devd.conf.setaside
-rw-r--r--  1 root  wheel   406B Jan 26 06:27 cups.conf
-rw-r--r--  1 root  wheel   406B Jan 26 06:27 cups.conf.sample
-rw-r--r--  1 root  wheel   1.7K Jan 26 09:20 webcamd.conf
root@mowa219-gjp4-8570p:~ # cat /usr/local/etc/devd/automount_devd.conf.setaside
notify 100 {
  match "system" "DEVFS";
  match "type" "CREATE";
  match "cdev" "(ugen|da|mmcsd)[0-9]+.*";
  action "/usr/local/sbin/automount $cdev attach";
};

notify 100 {
  match "system" "DEVFS";
  match "type" "DESTROY";
  match "cdev" "(ugen|da|mmcsd)[0-9]+.*";
  action "/usr/local/sbin/automount $cdev detach";
};

root@mowa219-gjp4-8570p:~ # 

Note to self: I found a February 2019 bookmark of FreeBSD Desktop – Part 17 – Configuration – Automount Removable Media | 𝚟𝚎𝚛𝚖𝚊𝚍𝚎𝚗 (via https://redd.it/9nblwo) … this must have been not long after I purchased the OnePlus 2 device.

vermaden commented 3 years ago

I would put automount_devd.conf to other place then /usr/local/etc/devd dir if I would like to disable it.

grahamperrin commented 3 years ago

Done. Thanks again.

root@mowa219-gjp4-8570p:~ # mv /usr/local/etc/devd/automount_devd.conf.setaside /usr/home/grahamperrin/Documents/IT/BSD/FreeBSD/automount_devd.conf
root@mowa219-gjp4-8570p:~ #