Skip to content

Commit 15b97a8

Browse files
mcdopemake update-other-docs
and
make update-other-docs
authored
#243: Prepare version 0.8.5 (#244)
* #243: Update pamusb-conf manpage * #243: Update ChangeLog * [Docs] Update non-manpage "doc/" files Signed-off-by: McDope <[email protected]> * #243: Update debian/changelog * #243: Update fedora specs changelog * #243: Update misc version statements/tags * [Docs] Update non-manpage "doc/" files Signed-off-by: McDope <[email protected]> * #243: Arch git version --------- Signed-off-by: McDope <[email protected]> Co-authored-by: make update-other-docs <[email protected]>
1 parent 4e4cfaa commit 15b97a8

File tree

12 files changed

+83
-11
lines changed

12 files changed

+83
-11
lines changed

ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
* 0.8.5
2+
[Feature] Support multiple devices per user
3+
[Enhancement] Misc. memory and string handling stuff
4+
[Enhancement] Deny if pads can't be updated
5+
[Enhancement] SELinux! There is now a profile for Fedora 40 (not installed automatically!) and a doc on how to create your own (see Wiki)
6+
[Bugfix] LC_ALL usage
7+
18
* 0.8.4
29
[Bugfix] loginctl usage was not sh compatible
310
[Bugfix] Misc. fixes related to memory handling

arch_linux/PKGBUILD_git

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Contributor: Pekka Helenius <fincer89 [at] hotmail [dot] com>
33

44
pkgname=pam_usb-git
5-
pkgver=0.8.4_r549.gf015d91
5+
pkgver=0.8.5_r559.g4e4cfaa
66
pkgrel=1
77
pkgdesc='Hardware authentication for Linux using ordinary flash media (USB & Card based).'
88
arch=($CARCH)

arch_linux/PKGBUILD_stable

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Contributor: Pekka Helenius <fincer89 [at] hotmail [dot] com>
33

44
pkgname=pam_usb
5-
pkgver=0.8.4
5+
pkgver=0.8.5
66
pkgrel=1
77
pkgdesc='Hardware authentication for Linux using ordinary flash media (USB & Card based).'
88
arch=($CARCH)

debian/changelog

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
libpam-usb (0.8.5) unstable; urgency=medium
2+
* [Feature] Support multiple devices per user
3+
* [Enhancement] Misc. memory and string handling stuff
4+
* [Enhancement] Deny if pads can't be updated
5+
* [Enhancement] SELinux! Wiki now has a doc on how to create your own profile
6+
* [Bugfix] LC_ALL usage
7+
8+
-- Tobias Bäumer <[email protected]> Fri, 26 Jul 2024 21:00:00 +0200
9+
110
libpam-usb (0.8.4) unstable; urgency=medium
211
* [Bugfix] loginctl usage was not sh compatible
312
* [Bugfix] Misc. fixes related to memory handling

doc/CONFIGURATION

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ The configuration file is formatted in XML and subdivided in 4 sections:
88
* Users declaration and settings
99
* Services declaration and settings
1010

11+
Note that for changes to the agent / events config you need to restart the agent service for them to take effect. Other changes are picked up on next pam_usb usage.
12+
1113
The syntax is the following:
1214

1315
```xml
@@ -104,8 +106,6 @@ The syntax is the following:
104106
Some cheap devices don't report a vendor and/or model. To use these devices you can use "Generic" for these values, then it won't be checked.
105107
Be aware that this reduces security if you have `one_time_pads` disabled since the device containing the volume won't be checked anymore (but these attributes could be faked with a custom firmware anyway).
106108

107-
You can configure as many devices as you want, but each user can only be configured to use a single device (currently).
108-
109109
### Example:
110110

111111
```xml
@@ -127,6 +127,8 @@ You can configure as many devices as you want, but each user can only be configu
127127
| `device` | Element | `id` of the device associated to the user | `MyDevice` |
128128
| `agent` | Element | Agent commands, for use with pamusb-agent | |
129129

130+
Note that one `<user>` can have multiple `<device>` (from v0.8.5 up).
131+
130132
### Agent
131133

132134
The agent is to be run as system service. If you installed by using the debian package it will automatically be configured as
@@ -224,13 +226,17 @@ sudo pamusb-conf --add-device=<devicename>
224226

225227
where `<devicename>` is a recognizable name for your device. This value is used internally in the configuration file as device `id` value and in output shown to users. (Note: because of it being used as an XML attribute value, it shouldn't contain ampersands etc.)
226228

229+
You can do this for multiple devices obviously.
230+
227231
3. Add necessary user configuration into `/etc/security/pam_usb.conf` by running:
228232

229233
```
230234
sudo pamusb-conf --add-user=<username>
231235
```
232236

233-
where `<username>` is a valid Unix user name.
237+
where `<username>` is a valid Unix user name.
238+
239+
If you added multiple devices you can repeat this command to choose an additional device for this user (from v0.8.5 up).
234240

235241
4. Tweak `/etc/security/pam_usb.conf` manually as desired. Link devices and users, etc.
236242

doc/QUICKSTART

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Once you've connected your USB device to the computer, use pamusb-conf to add it
3030

3131
Note that `MyDevice` can be any arbitrary name you'd like, but will be used as an XML attribute value so stay away from any special characters and stick to A-Z.
3232

33-
Also, you can add as many devices as you want. However, each user can currently only use a single device so additional devices can only be used for additional users.
33+
Also, you can add as many devices as you want. However, in versions prior to v0.8.5 each user can only use a single device. So additional devices can only be used for additional users. Starting from v0.8.5 a single user can have multiple devices assigned as well.
3434

3535
Next, configure users you want to be able to authenticate with pam_usb:
3636

doc/SECURITY

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# General note about security
2+
3+
`pam_usb` is intended as an "user comfort" utility. While it can enhance security, if used as a second factor, it can also reduce it.
4+
5+
Make sure you are aware of how it works and what you combine it with (see other warnings).
6+
7+
Also I want to point it that this isn't audited. I've tried to raise funds for it but there was literally no interest in it seemingly...
8+
19
# Warning about XDMCP
210

311
You should under no circumstances enable pamusb and XDMCP at the same time. Most graphical login managers are whitelisted and will not be checked for "remoteness" since issue #51 was fixed. This means if you enable XDMCP and have a usb device for an already configured user attached anyone connecting to your X-Server could login as that user!
@@ -6,6 +14,10 @@ I repeat, UNDER NO CIRCUMSTANCES ENABLE PAMUSB AND XDMCP AT THE SAME TIME! Don't
614

715
Note: you shouldn't use XDMCP these days anyway...
816

17+
# Warning about TeamViewer and x11vnc
18+
19+
Currently the local-check doesn't detect either TeamViewer or x11vnc connections. The same applies to gnome desktop sharing and I guess others also. There are attempts to resolve this, but even then there will likely always be some remote access software being able to circumvent the local check.
20+
921
# Warning about remote access (SSH etc)
1022

1123
In the past there have been ways to circumvent the local check (see issue [#51](https://github.com/mcdope/pam_usb/issues/51) and also the "[cup of tee](https://github.com/mcdope/pam_usb/issues/39)"). I'm confident that all known ways are fixed now.

doc/TROUBLESHOOTING

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ But if it does: please create an issue which should contain the output of `w` an
5959
Getting 'Pad checking failed!' when trying to authenticate
6060
--------------
6161

62-
This error means that either the machine/host specific pad file on the device, or - more likely - the user specific pad file in your homedir is not in sync anymore.
62+
This error means that either the machine/host specific pad file on the device, or - more likely - the user specific pad file in your homedir is not in sync anymore. It can also be caused if you use the same device on two computers and both share the same username (guess why I know :facepalm:).
6363

6464
It can happen if you remove the authentication device without unmounting it before, manually mess with the pad files (like copying from a previous device) or your system crashed before file buffers were written to the media and similar.
6565

@@ -70,6 +70,37 @@ To resolve this you can use `pamusb-conf --reset-pads=<USERNAME>`, which will re
7070
Agent configuration / commands don't work like expected
7171
--------------
7272

73+
You have restarted the agent service after your config changes, right? RIIIIIIGHT? Seriously, you need to restart it for changes to be picked up.
74+
7375
The agent will log all executed commands, as well as their exitcode; stdout and stderr (since v0.8.3). You can view this log either via systemd, or - easier - by `tail`'ing `/var/log/auth.log`.
7476

75-
You can use this to a) verify your config is picked up like expected and b) configured commands do what you want. For some programs, esp. ones expecting to be run within a graphical environment, you will have to provide environment values via `<env>` tags in the agent configuration. Usually the log will provide you with some good clues. But feel free to open a support issue if you need help.
77+
You can use this to a) verify your config is picked up like expected and b) configured commands do what you want. For some programs, esp. ones expecting to be run within a graphical environment, you will have to provide environment values via `<env>` tags in the agent configuration. Usually the log will provide you with some good clues. But feel free to open a support issue if you need help.
78+
79+
80+
pam_usb not working in login manager when the device wasn't plugged before login manager started / always asked for password
81+
--------------
82+
83+
Are you using `lightdm` by any chance?
84+
85+
Some login managers auto-select the first user they have in their list. This starts the pam chain and pam_usb will see "device is not plugged" and deny the request. At that point then pam_unix (or whatever your next module is) kicks in and asks for the password. This is intended behavior in pam_usb - the actual issue here is the login manager assuming which user wants to login.
86+
87+
Even if you now plug the device, from pam_usb POV the request is failed/finished and it wont care anymore. You will have to press [ESC] to abort the current authentication request and click/select the user again (if not auto-selected).
88+
89+
It's planned to implement a workaround for this in #221, but no ETA for that.
90+
91+
92+
My media isn't accepted after I unplugged it before
93+
--------------
94+
95+
Is that media NTFS formatted? NTFS really doesn't like unplugging while being mounted. It becomes flagged as "dirty" and you will have to run `chkdsk /R /F /V` on it.
96+
97+
It isn't NTFS? That's a bug most likely, please report it as issue.
98+
99+
SELinux and pam_usb
100+
--------------
101+
102+
If you have SELinux enabled you will likely get errors with pam_usb. At least on Fedora 40 you need to allow some things that are by default denied.
103+
104+
There is now a profile available for Fedora 40 that you can install to allow pam_usb to work like intended. To install it download both files from `selinux/<yourDistribution>` to some directory, open a shell in that directory and then run `semodule login.pp`. Replace "login" with the actual profile you want to install, but so far there is only one for login. It may work on other distributions or releases, too but this is untested.
105+
106+
In case it doesn't work for you, see the discussion at https://github.com/mcdope/pam_usb/discussions/241 to find out how to create your own profile.

doc/pamusb-conf.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Add a device
3131
.TP
3232
.B
3333
\fB--add-user\fP, \fB-u\fP
34-
Add a user
34+
Add a user (you can call this multiple times, to add multiple devices for a single user)
3535
.TP
3636
.B
3737
\fB--yes\fP, \fB-y\fP

fedora/SPECS/pam_usb.spec

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ rm -rf %{buildroot}/usr/share/pam-configs
5656
%doc %attr(0644,root,root) /usr/share/doc/pam_usb/TROUBLESHOOTING
5757

5858
%changelog
59+
* Thu Jul 26 2024 Tobias Bäumer <[email protected]> - 0.8.5
60+
- [Feature] Support multiple devices per user
61+
- [Enhancement] Misc. memory and string handling stuff
62+
- [Enhancement] Deny if pads can't be updated
63+
- [Enhancement] SELinux! There is now a profile for Fedora 40 (not installed automatically!) and a doc on how to create your own (see Wiki)
64+
- [Bugfix] LC_ALL usage
65+
5966
* Thu Jan 04 2024 Tobias Bäumer <[email protected]> - 0.8.4
6067
- [Bugfix] loginctl usage was not sh compatible
6168
- [Bugfix] Misc. fixes related to memory handling

src/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
#ifndef PUSB_VERSION_H_
1919
# define PUSB_VERSION_H_
2020

21-
# define PUSB_VERSION "0.8.4"
21+
# define PUSB_VERSION "0.8.5"
2222

2323
#endif /* !PUSB_VERSION_H_ */

tools/pamusb-conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ def resetPads():
386386
sys.exit(0)
387387

388388
def usage():
389-
print('Version 0.8.4')
389+
print('Version 0.8.5')
390390
print('Usage: %s [--help] [--verbose] [--yes] [--config=path] [--reset-pads=username] [--add-user=name | --add-device=name [[--device=number] [--volume=number]]' % os.path.basename(__file__))
391391
sys.exit(1)
392392

0 commit comments

Comments
 (0)