|
Parish | Peculiar | Pedantry | Personal | Photography | Photos | Plateways | Positronics | Post | Professional | Programme | Programming | Places | Private |
In order to access addresses outside the local network, the gateway to the wider network must be specified. This is done with the following command (as root, via sudo):
ip route add default via 10.0.0.1 dev enp5s0default refers to the gateway, and it is identified as "via" the device at 10.0.0.1, reached via the network device enp5s0. (Note: the gateway used to be 10.0.0.101, but has been changed with the new router to 10.0.0.1. Legacy issues may be a problem.)
Note: It is not clear how often this needs to be set. I have had problems on reboots with these parameters being lost. Take note!
With several computers within (and outwith) the house, cross mounting files can lead to username confusion, unless all the usernames are consistent. Hence a push to standardize on UIDs:
Name | UID | GID | Group Name | Home Directory | Interpreter | |
---|---|---|---|---|---|---|
root | x | 0 | 0 | root | /root | /bin/bash |
daemon | x | 1 | 1 | daemon | /usr/sbin | /usr/sbin/nologin |
bin | x | 2 | 2 | bin | /bin | /usr/sbin/nologin |
sys | x | 3 | 3 | sys | /dev | /usr/sbin/nologin |
sync | x | 4 | 65534 | sync | /bin | /bin/sync |
games | x | 5 | 60 | games | /usr/games | /usr/sbin/nologin |
man | x | 6 | 12 | man | /var/cache/man | /usr/sbin/nologin |
lp | x | 7 | 7 | lp | /var/spool/lpd | /usr/sbin/nologin |
x | 8 | 8 | /var/mail | /usr/sbin/nologin | ||
news | x | 9 | 9 | news | /var/spool/news | /usr/sbin/nologin |
uucp | x | 10 | 10 | uucp | /var/spool/uucp | /usr/sbin/nologin |
proxy | x | 13 | 13 | proxy | /bin | /usr/sbin/nologin |
www-data | x | 33 | 33 | www-data | /var/www | /usr/sbin/nologin |
backup | x | 34 | 34 | backup | /var/backups | /usr/sbin/nologin |
list | x | 38 | 38 | Mailing List Manager | /var/list | /usr/sbin/nologin |
irc | x | 39 | 39 | ircd | /run/ircd | /usr/sbin/nologin |
gnats | x | 41 | 41 | Gnats Bug-Reporting System (admin) | /var/lib/gnats | /usr/sbin/nologin |
systemd-network | x | 100 | 102 | systemd Network Management,,, | /run/systemd | /usr/sbin/nologin |
systemd-resolve | x | 101 | 103 | systemd Resolver,,, | /run/systemd | /usr/sbin/nologin |
messagebus | x | 102 | 105 | /nonexistent | /usr/sbin/nologin | |
systemd-timesync | x | 103 | 106 | systemd Time Synchronization,,, | /run/systemd | /usr/sbin/nologin |
syslog | x | 104 | 111 | /home/syslog | /usr/sbin/nologin | |
_apt | x | 105 | 65534 | /nonexistent | /usr/sbin/nologin | |
tss | x | 106 | 112 | TPM software stack,,, | /var/lib/tpm | /bin/false |
uuidd | x | 107 | 115 | /run/uuidd | /usr/sbin/nologin | |
systemd-oom | x | 108 | 116 | systemd Userspace OOM Killer,,, | /run/systemd | /usr/sbin/nologin |
tcpdump | x | 109 | 117 | /nonexistent | /usr/sbin/nologin | |
avahi-autoipd | x | 110 | 119 | Avahi autoip daemon,,, | /var/lib/avahi-autoipd | /usr/sbin/nologin |
usbmux | x | 111 | 46 | usbmux daemon,,, | /var/lib/usbmux | /usr/sbin/nologin |
dnsmasq | x | 112 | 65534 | dnsmasq,,, | /var/lib/misc | /usr/sbin/nologin |
kernoops | x | 113 | 65534 | Kernel Oops Tracking Daemon,,, | / | /usr/sbin/nologin |
avahi | x | 114 | 121 | Avahi mDNS daemon,,, | /run/avahi-daemon | /usr/sbin/nologin |
cups-pk-helper | x | 115 | 122 | user for cups-pk-helper service,,, | /home/cups-pk-helper | /usr/sbin/nologin |
speech-dispatcher | x | 119 | 29 | Speech Dispatcher,,, | /run/speech-dispatcher | /bin/false |
rtkit | x | 116 | 123 | RealtimeKit,,, | /proc | /usr/sbin/nologin |
whoopsie | x | 117 | 124 | /nonexistent | /bin/false | |
sssd | x | 118 | 125 | SSSD system user,,, | /var/lib/sss | /usr/sbin/nologin |
nm-openvpn | x | 120 | 126 | NetworkManager OpenVPN,,, | /var/lib/openvpn/chroot | /usr/sbin/nologin |
saned | x | 121 | 128 | /var/lib/saned | /usr/sbin/nologin | |
colord | x | 122 | 129 | colord colour management daemon,,, | /var/lib/colord | /usr/sbin/nologin |
geoclue | x | 123 | 130 | /var/lib/geoclue | /usr/sbin/nologin | |
pulse | x | 124 | 131 | PulseAudio daemon,,, | /run/pulse | /usr/sbin/nologin |
gnome-initial-setup | x | 125 | 65534 | /run/gnome-initial-setup/ | /bin/false | |
hplip | x | 126 | 7 | HPLIP system user,,, | /run/hplip | /bin/false |
gdm | x | 127 | 133 | Gnome Display Manager | /var/lib/gdm3 | /bin/false |
sshd | x | 128 | 65534 | /run/sshd | /usr/sbin/nologin | |
lizardfs | x | 129 | 137 | /var/lib/lizardfs | /usr/sbin/nologin | |
fwupd-refresh | x | 130 | 138 | fwupd-refresh user,,, | /run/systemd | /usr/sbin/nologin |
postgres | x | 131 | 139 | PostgreSQL administrator,,, | /var/lib/postgresql | /bin/bash |
postfix | x | 132 | 140 | /var/spool/postfix | /usr/sbin/nologin | |
njh | x | 1001 | 1001 | Nathan Hurst | /home/njh | /bin/bash |
weed | x | 1002 | 1002 | seaweedfs | /home/weed | /bin/bash |
bunny | x | 2021 | 2021 | Lynne Shandley | /home/bunny | /bin/bash |
ajh | x | 3801 | 3801 | Angas John Hurst | /home/ajh | /bin/bash |
snapd-range-524288-root | x | 524288 | 524288 | /nonexistent | /usr/bin/false | |
snap_daemon | x | 584788 | 584788 | /nonexistent | /usr/bin/false | |
nobody | x | 65534 | 65534 | nobody | /nonexistent | /usr/sbin/nologin |
I ran into a problem after changing my user/group IDs on a remote system. I could no longer login using my ssh keys, but had to enter a password each time. Here's my discussion with Claude:
My question:
I have a local-remote computer system on which I have ssh key sign-in. I recently changed my user/group ids on the remote system, and now I cannot login to the remote system without entering a password. I have checked that the .ssh directory has all the new user/group ids set to the corrent new values. What else should I check?
Claude said:
To troubleshoot this issue, here are several things you
should check:
Ensure the ~/.ssh directory has 700 permissions
(rwx------). Verify the authorized_keys file has 600
permissions (rw-------)
Check the /etc/ssh/sshd_config file on the remote
system Make sure PubkeyAuthentication is set to
'yes' Confirm that PasswordAuthentication is set to
'no' if you want to enforce key-based authentication
Verify that your public key is correctly listed in the
~/.ssh/authorized_keys file on the remote system
If SELinux is enabled, check if it's blocking SSH access
Restart the SSH service on the remote system to
ensure it picks up any changes
Check SSH logs (usually in /var/log/auth.log or
/var/log/secure) for any error messages
Try connecting with verbose output using 'ssh -vv
user@remote_host' to get more detailed information
about the connection attempt
Ensure your home directory permissions are not too
open (should be 755 or more restrictive)
Verify you're using the correct key pair
Check if any firewall rules are blocking SSH access
My response:
Thank you. Point 1 was the problem.
These are tips I have gleaned that describe useful (?) customizations in Ubuntu (13.10 - now 22.04).
To (re)name a disk using Ubuntu, use:
e2label /dev/sdx namewhere /dev/sdx is the device name, and name is the desired disk name.
Also a reminder to setup /etc/fstab to auto mount the disk if required.
I prefer to have the focus following the mouse, and to automatically raise the window in focus. Here's how:
gsettings set org.gnome.desktop.wm.preferences focus-mode 'sloppy' gsettings set org.gnome.desktop.wm.preferences auto-raise true gsettings set org.gnome.desktop.wm.preferences auto-raise-delay 1000
To find out what version of Ubuntu is running, type lsb_release -a into a terminal window at a shell prompt.
Here's a very helpful guide to Writing your own Systemd Scripts (Thanks to Guido Socher for this tutorial.)
I quite frequently get messages like this:
E: The repository 'https://ppa.launchpadcontent.net/gnome3-team/gnome3/ubuntu jammy Release' does not have a Release file. Warning: apt-get update failed for some reasonI don't understand quite what this means, and various responses to this message on the web were not helpful. However, this worked:
Check out the web page .
The tool arandr provides a graphical interface to move the monitors around, and is intuitively more obvious. Hoverever, if you want to use the CLI version:
First use xrandr to determine the names of the monitors. This is what I got:
xrandr --listmonitors Monitors: 2 0: +*XWAYLAND16 1920/600x1080/340+1920+0 XWAYLAND16 1: +XWAYLAND17 1920/600x1080/340+0+0 XWAYLAND17I wanted them the other way round, so XWAYLAND16 and XWAYLAND17 need to be swapped:
xrandr --output XWAYLAND17 --left-of XWAYLAND16
Ubuntu 18.04 (and 17, I believe) have gratuitously changed the networking setup. All I see when I open the network system config is a VPN option, and a Network Proxy option. No dialogue for setting wired network parameters. I wanted to be able to change the dns settings, but there seemed to be no way of doing it. So I did some research, and found that my system used what is "mostly obsolete on Ubuntu 18.04 systems". However, it wasn't obsolete, and here is what I did to fix the problem. (taken from https://linuxconfig.org/how-to-configure-static-ip-address-on-ubuntu-18-04-bionic-beaver-linux )
Set the contents of /etc/network/interfaces to
auto lo iface lo inet loopback # The primary network interface auto eno1 iface eno1 inet static address 10.0.0.3 netmask 255.255.255.0 gateway 10.0.0.101 dns-nameservers 8.8.8.8 8.8.4.4where eno1 is the name of the ethernet interface, and gateway is the IP address of my local gateway router. Save this file, and then reboot. (You are supposed to be able to systemctl restart the network manager, but that did not work for me.) After rebooting, the correct gateway (10.0.0.101) is used. I also changed the address of the interface eno1to be static, but that should not be germane to the problem being addressed.
Most of the webpage material on 18.04 networking talks about netplan. I have not yet understood how this works, but I'm saving this link as a starting point to understanding it. Also this link talks about reverting to ifupdown, so that may be worth reading too.
Update 20201019:151335 Grrr! It is enough to make one throw Ubuntu in the bin. I found this helpful link on fixing DNS on 18.04, and it worked, but 20.04 is different (although the documentation I found says not!): Fix DNS on 18.04 Now that I have installed 20.04, I found that this was a more accurate (and hence more helpful) page: Fix DNS on 20.04
I had trouble finding out what the columns in an ls -l listing mean. Here is an explanation from MKSSoftware:
Long Output Format The output from ls -l summarizes all the most important information about the file on one line. If the specified pathname is a directory, ls displays information on every file in that directory (one file per line). It precedes this list with a status line that indicates the total number of file system blocks (512 byte units) occupied by the files in that directory. Here is a sample of the output along with an explanation. -rw-rw-rw- 1 root dir 104 Dec 25 19:32 file The first character identifies the file type: - Regular file b Block special file c Character special file d Directory l Symbolic link n Network file p FIFO s Socket The next nine characters are in three groups of three; they describe the permissions on the file. The first group of three describes owner permissions; the second describes group permissions; the third describes other (or world) permissions. Because Windows systems do not support group and other permissions, these are copies of the owner's permissions. Characters that may appear are: r Permission to read file w Permission to write to file x Permission to execute file a Archive bit is on (file has not been backed up) c Compressed file s System file h Hidden file t Temporary file On Windows systems, most of the permissions shown are artificial, with no real meaning. The w bit is set according to the ReadOnly attribute, and the rx bits are always set on. You can change some permissions with the chmod command. After the permissions comes the number of links to the file. Next comes the name of the owner of the file or directory. On file systems that don't support 7/2008R2/8/2012/10/2016 security, the owner name cannot be determined and the owner ID number is displayed instead. Under 7/2008R2/8/2012/10/2016 the name of the owner of a file is displayed if the file's SIDs can be obtained and if these SIDs have an associated name in the SAM database. If the file has a SID associated with it, but the name of the SID cannot be determined, then the value of the SID is displayed. (This can happen when the current user is not in the domain that was used when the file was created.) If the file does not have a SID (for example, if it is on a non-NTFS file system), or if the file security information cannot be accessed because the file is locked by another process, then the user name appears as <unavail>. Note: When a listed file is owned by the local computer, the owner is displayed as computer_name\ where computer_name is the name of the local computer. Then comes the name of the group that owns the file or directory. On Windows systems, the same rules are followed for the group name as for the owner name. Following this is the size of the file, expressed in bytes. After this comes a date and time. For a file, this is the time that the file was last changed; for a directory, it is the time that the directory was created. The -c and -u options can change which time value is used. If the date is more than six months old or if the date is in the future, the year is shown instead of the time. The last item on the line is the name of the file or directory.
I couldn't get the above recipe to work for an SD card. It seems to be more subtle than that. I used gparted to solve the problem:
1. $ sudo gparted 2. find the partition where the card is mounted by using the pull-down disk list in the top right hand corner. 3. unmount the disk if it is mounted (right click on the line with the partition in question and select "Unmount" option. 4. right click again, the pull down will now show "Label File System" as an option, select this. 5. Enter new label, click OK 6. exit gparted, and apply pending operations.
There is a useful tutorial on how to setup NFS mounts at https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nfs-mount-on-ubuntu-16-04
When using a portrait monitor, or a monitor with rotating screen, you can rotate the display to suit according to the following parameter values:
For transient rotations, use
echo 1 | sudo tee /sys/class/graphics/fbcon/rotate
and for permanent rotation, (sudo) edit /etc/default/grub to ensure that it contains a line:
GRUB_CMDLINE_LINUX="fbcon=rotate:1"
In both cases, substitute the 1 with the required rotation parameter.
I got a bit fed up with make printing directory entry and exit messages when recursively making, so I added this to my master make directory:
ifndef MAKEFLAGS MAKEFLAGS += --no-print-directory endifThe general advice is that if you want to debug makes that do use recursive makes, then you should turn this off (and resume printing the entry and exit messages).
To enable multiple workspaces:
To change the nuumber of workspaces:
To change the keyboard shortcuts for navigating between workspaces:
The last word (true/false) turns on the display of the user name in the root window title bar (if true), and false turns it off.
These are my settings for the gnome-terminal configuration file /usr/share/applications/gnome-terminal.desktop. Actually, the proper place for this file is /home/ajh/.local/share/applications/gnome-terminal.desktop, which is now where it is placed. The /usr location is for system-wide defaults.
[Desktop Entry] Name=Terminal Comment=Use the command line Keywords=shell;prompt;command;commandline;cmd; TryExec=gnome-terminal Exec=gnome-terminal Icon=utilities-terminal Type=Application X-GNOME-DocPath=gnome-terminal/index.html X-GNOME-Bugzilla-Bugzilla=GNOME X-GNOME-Bugzilla-Product=gnome-terminal X-GNOME-Bugzilla-Component=BugBuddyBugs X-GNOME-Bugzilla-Version=3.6.1 Categories=GNOME;GTK;Utility; StartupNotify=true OnlyShowIn=GNOME;Unity; Keywords=Run; Actions=heywood;heywood-root;dimboola;echuca;spencer; X-Ubuntu-Gettext-Domain=gnome-terminal [Desktop Action heywood] Name=Heywood Exec=gnome-terminal --window-with-profile=Heywood [Desktop Action heywood-root] Name=Heywood-Root Exec=gnome-terminal --window-with-profile=Heywood-Root -x ssh root@localhost [Desktop Action dimboola] Name=Dimboola Exec=/usr/bin/gnome-terminal --window-with-profile=Dimboola -x ssh dimboola [Desktop Action echuca] Name=Echuca Exec=/usr/bin/gnome-terminal --window-with-profile=Echuca -x ssh echuca [Desktop Action spencer] Name=Spencer Exec=/usr/bin/gnome-terminal --window-with-profile=Spencer -x ssh spencer
Make sure when editing the Desktop Actions that you add the "Name" field to the list of "Actions" in the top entry.
The other thing to note is that when you first create this file, you need to make it executable, and then drag it from the Files display to the Launcher bar. If the file is not visible in Files, click View->Show Hidden Files to make it visible.
The desktop file syntax is described in the Desktop File Specs page.
I am running a samba server on my disk farm server. Here's a useful page on how to configure a Ubuntu Samba Server.
To set the system timezone to Melbourne
$ sudo bash $ cd /etc $ ln -sf /usr/share/zoneinfo/Australia/Melbourne localtime
I got the irrits with Apple and have sworn not to buy a new system or upgrade the systems I have, preferring instead to move (back) to Linux as necessity demands. But Ubuntu has its own irrits, too! This is a log of things that I have fixed.
Mac OSX calls them "Spaces", Ubuntu calls them "Workspaces". I prefer "Virtual Desktops". Oh well. You can't please everyone.
The hassle is that there is no clear way of driving the number of them, and how to switch between them.
One of the hassles of upgrading a system (and moving from Apple to Linux counts as an upgrade) is that new versions of just about everything surface, just when you are not in the mood for dealing with them. I suppose the Nathans of the world would argue that this is why one should upgrade continuously, so that the Principle of Least Surprise is observed. Whatever. Moving to Ubuntu forced my Emacs from version 23 to version 24, and my PSGML scripts all stopped working.
Fortunately, PSGML has also been upgraded to now run with version 24. See the page by the author, Florian v. Savigny, or download the code directly
(As of August 2018)
I wanted to keep my laptop shut (because the cat kept sleeping on the keyboard as it was a nice warm place!), yet still be able to access it remotely. It was a dickens of a job getting it to "Wake on LAN access", but this page helped. One extra comment; when the page says to use ethtool -s INTERFACE wol ug, make sure to add that extra 'u' flag, so that the system will wake on unicast accesses, as well as magic packets.
I added a 10Gbs network card to my server, and from then on, remote ssh to the machine took around 30s to come up. After much digging around, I found the following Useful Page, which although quite helpful didn't directly fix the problem. A bit more digging around found that setting UsePAM no in /etc/ssh/sshd_config did fix the problem (but incidentally also shortened the MotD!)
wallch does not run correctly, and keeps crashing. One point is when you start the window (type just 'wallch' in a terminal window) and click 'start'. The first time it does nothing, the second time, it crashes with a floating point exception.
It does work if you type 'wallch --start' at a terminal prompt.
vlc comes up with very small text, too small to read. I have traced the steps offered in (URL cite) by clicking in the right real estate territory, but nothing changes.
There is also a problem with .wtv files having no sound. I fixed this on one computer (a generic Intel box) where the font size was readable, but could not on the other computer (an iMac).
This may be a problem with very old CDs, but many of my collection not only do not mount, but they also put the CDrom into a frozen state, where the only recovery option is to reboot.
I dislike workspaces only partly appearing when the 'super' key is pressed, and you have to move the mouse into the sidebar to see the workspace icons. Why not blow the Icons out immediately?
files has a big problem with lizardfs, and refuses/takes a very long time to display some subdirectories of a lizard mount. The same subdirectories list correctly when displayed with ls.
again, perhaps a lizardfs issue, but backup keeps failing with a /lizard mount save directory.
Firefox refuses to display some images in my web pages - the images can be opened successfully from the command line, and have the correct permissions. The problem seems to be one of just not wanting to load the relevant files.
I switched to using Dolphin as my file manager window, but it does not recognize my Samsung S8 when it is plugged in. Use the old 'files' for this purpose: it does work.
I bought a new laptop (HP Pavilion x360), but while its wifi worked under Windows, it did not with Ubuntu. After some mixed success in downloading drivers for the ReakTek rtl8822be (success in downloading, failure in getting it to work), I saw this web page, which said to turn off secure boot, which I did. That fixed it!
To turn off secure boot, bring up the BIOS start screen and go to ...
For some reason, screen lock does not stay disabled when I suspend Ubuntu. I have tried various settings of the system parameter in "Privacy -> Screen Lock", to no avail. So now I am trying
gsettings set org.gnome.desktop.lockdown disable-lock-screen trueto see if that has a more lasting effect.
I also followed the advice of Kishn Bera and changed /etc/default/grub so that the line GRUB_CMDLINE_LINUX="" now says GRUB_CMDLINE_LINUX="nouveau.modeset=0"
I'm now running Ubuntu 22.04, but I upgraded only after encountering a whole series of problems with 18.04. Here are the range of gripes I had with Ubuntu 18.04:
Here is a list of all the software I regularly use, and which
needs to be installed in a new Ubuntu system (see also The Install Page):
This page is copyright, and maintained by John Hurst. | 117 accesses all since 26 Nov 2023 |
||
Local servers:
Localhost
Newport
Burnley
Geelong
Jeparit
Reuilly
Spencer
(accessible only on local network.)
|