Sample Header Ad - 728x90

Restricted shell rush "invalid uid" error

2 votes
1 answer
465 views
I am setting up a new local account on a Debian buster server. The account name is "auto-upload". The entry in /etc/passwd looks like this:
auto-upload:x:1060:1060:auto-upload:/home/auto-upload:/usr/sbin/rush
As you can see I am attempting to use the "rush" restricted shell (version 1.8) with this account. The rush configuration file is
debug 1

rule default
  acct on
  limits t10r20
  umask 002
  env - USER LOGNAME HOME PATH
  fall-through

rule scp-to-debrepo
  command ^scp (-v )?-t( --)? /srv/repos/?
  set /usr/bin/scp
  match[$] ! /\.\.
  transform[$] s,^/incoming/,,
  chroot /srv/repos
  chdir /srv/repos
When I attempt to scp a file to that account I see this in the server logs:
2021-12-03T12:20:25.240111-08:00 myserver rush: debug level set to 1
2021-12-03T12:20:25.240755-08:00 myserver rush: Serving request "scp -t /srv/repos/basic/incoming" for auto-upload by rule default
2021-12-03T12:20:25.240971-08:00 myserver rush: Serving request "scp -t /srv/repos/basic/incoming" for auto-upload by rule scp-to-debrepo
2021-12-03T12:20:25.254718-08:00 myserver rush: invalid uid 1060
2021-12-03T12:20:30.257645-08:00 myserver sshd: Received disconnect from 192.168.225.188 port 45518:11: disconnected by user
Why is it telling me "invalid uid 1060" and how do I fix this?
Asked by rlandster (763 rep)
Dec 3, 2021, 08:29 PM
Last activity: Jan 23, 2023, 10:19 PM