[BackupPC-users] Fatal error (bad version): /sbin/nologin: invalid option
I also think it's coming from the remote side. Loging in with su -s /bin/bash - backuppc with the '-' as you suggested does not stop the backup from working on the command line. I also installed backuppc on another server and tried to backup another client (so, 2 different machines involved here), and again the same error message. Fatal error (bad version): /sbin/nologin: invalid option -- 'c' Usage: nologin [options] Politely refuse a login. Options: -h, --help display this help and exit -V, --version output version information and exit For more details see nologin(8). Something is being executed on the remote side with option '-c', maybe 'su'. I get the same message when I try to run su backuppc -c ls from the backuppc server as root nologin: invalid option -- 'c' Usage: nologin [options] Politely refuse a login. Options: -h, --help display this help and exit -V, --version output version information and exit For more details see nologin(8). Fuji +-- |This was sent by fujisa...@gmail.com via Backup Central. |Forward SPAM to ab...@backupcentral.com. +-- -- ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Fatal error (bad version): /sbin/nologin: invalid option
Hi, Les Mikesell wrote on 2015-10-28 12:56:16 -0500 [Re: [BackupPC-users] Fatal error (bad version): /sbin/nologin: invalid option]: > On Wed, Oct 28, 2015 at 12:04 PM, fujisan > wrote: > > [...] > > So this nologin erro message does not seem to come from user backuppc. > > Could it be coming from the remote side via ssh? yes, it obviously is, and no, I don't understand that either. I went through the BackupPC code involved yesterday, and I'm convinced the error message can *only* come from the remote side, because no shell on the BackupPC server is involved. > I don't see why that would be different when starting from the server > command line vs the web interface but maybe there is something different > about the ssh key that is used. Well, we're guessing here. I don't see how a different ssh key would change the remote user's shell (and please note that '-l root' was explicitly specified in the RsyncClientCmd), but the one difference I do see is that # su -s /bin/bash backuppc (from memory) doesn't force a "login environment", so you *might* be using root's .ssh/config in one case and backuppc's in the other, which could, in theory, map your client host name to a different machine with a Host foo HostName bar type directive (or to a different ssh port - e.g. for an sshd inside a chroot - in much the same way). That is the only reason that I can think of why root@whateverthenamewas would have /sbin/nologin as shell in one case and a working shell in the other. Well, maybe PAM could also do that somehow. I'm convinced it will turn out to be something completely different, though, but I would try using su -s /bin/bash - backuppc (note the '-' (or '-l') parameter) and look whether that *stops* the command line backup from working. > In any case, the issue seems to be something about your shell setup rather > than in backuppc itself. Definitely. Regards, Holger -- ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Fatal error (bad version): /sbin/nologin: invalid option
On Wed, Oct 28, 2015 at 12:04 PM, fujisan wrote: > I did change the shell of user backuppc to /bin/bash and I got the exact same > error message. > So this nologin erro message does not seem to come from user backuppc. > Could it be coming from the remote side via ssh? I don't see why that would be different when starting from the server command line vs the web interface but maybe there is something different about the ssh key that is used. In any case, the issue seems to be something about your shell setup rather than in backuppc itself. -- Les Mikesell lesmikes...@gmail.com -- ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
[BackupPC-users] Fatal error (bad version): /sbin/nologin: invalid option
I did change the shell of user backuppc to /bin/bash and I got the exact same error message. So this nologin erro message does not seem to come from user backuppc. Fuji +-- |This was sent by fujisa...@gmail.com via Backup Central. |Forward SPAM to ab...@backupcentral.com. +-- -- ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Fatal error (bad version): /sbin/nologin: invalid option
On Wed, Oct 28, 2015 at 10:45 AM, fujisan wrote: > You did not understand, Les. > > It is NOT running from the web interface. it IS running from the command line. > That is my problem. > Here is the relevant part of the error message you posted: Fatal error (bad version): /sbin/nologin: invalid option -- 'c' Usage: nologin [options] Politely refuse a login. That is happening when you use the web interface, and not from the command line. It is not happening from the command line because you explicitly set bash as your shell in your su command. The part I don't understand is why the web interface is invoking the user's shell. It is like it is using system() instead of exec() to run the command at some point. Setting backuppc's shell to /bin/bash would probably fix it, but I think something else is wrong. -- Les Mikesell lesmikes...@gmail.com -- ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
[BackupPC-users] Fatal error (bad version): /sbin/nologin: invalid option
That's part of the BackupPC documentation: BackupPC User It is best if BackupPC runs as a special user, eg backuppc, that has limited privileges. It is preferred that backuppc belongs to a system administrator group so that sys admin members can browse BackupPC files, edit the configuration files and so on. Although configurable, the default settings leave group read permission on pool files, so make sure the BackupPC user's group is chosen restrictively. On this installation, this is backuppc. For security purposes you might choose to configure the BackupPC user with the shell set to /bin/false. Since you might need to run some BackupPC programs as the BackupPC user for testing purposes, you can use the -s option to su to explicitly run a shell, eg: su -s /bin/bash backuppc Depending upon your configuration you might also need the -l option. +-- |This was sent by fujisa...@gmail.com via Backup Central. |Forward SPAM to ab...@backupcentral.com. +-- -- ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Fatal error (bad version): /sbin/nologin: invalid option
On Wed, Oct 28, 2015 at 6:34 AM, fujisan wrote: > Well, when i do > > su backuppc > > it says > > This account is currently not available. > > But that's normal because the shell is set to /sbin/nologin. > > Fuji > That's probably a smart configuration to protect the backuppc user. If you need to set up SSH keys or perform other maintenance as the backuppc user, you can log in temporarily: sudo su - backuppc -s /bin/bash > ___ > BackupPC-users mailing list > BackupPC-users@lists.sourceforge.net > List:https://lists.sourceforge.net/lists/listinfo/backuppc-users > Wiki:http://backuppc.wiki.sourceforge.net > Project: http://backuppc.sourceforge.net/ > -- David Cramblett -- ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
[BackupPC-users] Fatal error (bad version): /sbin/nologin: invalid option
You did not understand, Les. It is NOT running from the web interface. it IS running from the command line. That is my problem. +-- |This was sent by fujisa...@gmail.com via Backup Central. |Forward SPAM to ab...@backupcentral.com. +-- -- ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Fatal error (bad version): /sbin/nologin: invalid option
On Wed, Oct 28, 2015 at 8:34 AM, fujisan wrote: > Well, when i do > > su backuppc > > it says > > This account is currently not available. > > But that's normal because the shell is set to /sbin/nologin. > If you look at your original error message you posted, you'll see that it comes from /sbin/nologin. I don't quite understand why it is running when you start a backup from the web interface but that is your problem. -- Les Mikesell lesmikes...@gmail.com -- ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
[BackupPC-users] Fatal error (bad version): /sbin/nologin: invalid option
Well, when i do su backuppc it says This account is currently not available. But that's normal because the shell is set to /sbin/nologin. Fuji +-- |This was sent by fujisa...@gmail.com via Backup Central. |Forward SPAM to ab...@backupcentral.com. +-- -- ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Fatal error (bad version): /sbin/nologin: invalid option
"ibs/" is the reversed beginning of the error message you've got. "Fatal error (bad version):" folowed by the text received from the remote end: > Fatal error (bad version): /sbin/nologin: invalid option -- 'c' > Usage: nologin [options] Politely refuse a login. > Options: > -h, --help display this help and exit > -V, --version output version information and exit > For more details see nologin(8). -- Alexander -- ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Fatal error (bad version): /sbin/nologin: invalid option
On 28.10.15 13:25, fujisan wrote: > > Where is that number 1768059695 coming from? > I guess you are getting some text from remote machine instead or rsync protocol message. DEC -> HEX -> ASCII 1768059695 -> 6962732F -> ibs/ It looks like you have a problem with ssh login. You changed shell before start backup from command line and it worked. > # su -s /bin/bash backuppc If you omit "-s /bin/bash" you should get the same error. -- Alexander -- ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
[BackupPC-users] Fatal error (bad version): /sbin/nologin: invalid option
I have noticed that when I run the backup from the web UI, I see this line: Got remote protocol 1768059695 but when i run it on the command line, I see this one: Got remote protocol 31 That number (31 or 1768059695) is a version number as seen in the file /usr/lib64/perl5/vendor_perl/File/RsyncP.pm in the remoteStart function. That version number is supposed to be between 20 and 40. With a version number of 1768059695, the function remoteStart crashes with the message starting with "Fatal error (bad version):" (line 407-408 of /usr/lib64/perl5/vendor_perl/File/RsyncP.pm from package perl-File-RsyncP-0.74-1.fc22.x86_64). So there seems to be a bug in BackupPC somewhere. Where is that number 1768059695 coming from? I have BackupPC-3.3.1-1.fc22.x86_64 installed on Fedora 22. Regards, Fuji +-- |This was sent by fujisa...@gmail.com via Backup Central. |Forward SPAM to ab...@backupcentral.com. +-- -- ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
[BackupPC-users] Fatal error (bad version): /sbin/nologin: invalid option
Hi there, I have setup a backuppc server but when I start a backup through the web page of the server (http://myserver/BackupPC?host=myclient) by clicking either the "Start Incr Backup" or the "Start Full Backup" button, it fails saying: -- incr backup started back to 2015-10-26 18:05:18 (backup #0) for directory /home/smith Running: /usr/bin/ssh -q -x -l root myclient /usr/bin/rsync --server --sender --numeric-ids --perms --owner --group -D --links --hard-links --times --block-size=2048 --recursive . /home/smith/ Xfer PIDs are now 9336 Rsync command pid is 9336 Got remote protocol 1768059695 Fatal error (bad version): /sbin/nologin: invalid option -- 'c' Usage: nologin [options] Politely refuse a login. Options: -h, --help display this help and exit -V, --version output version information and exit For more details see nologin(8). Checksum seed is 1869492078 Got checksumSeed 0x6f6e2f6e Read EOF: Connection reset by peer Tried again: got 0 bytes fileListReceive() failed Done: 0 files, 0 bytes Got fatal error during xfer (fileListReceive failed) Backup aborted (fileListReceive failed) -- So instead of starting the backup from the web UI of backuppc, I log in as user 'backuppc' -- # su -s /bin/bash backuppc -- and I start running a backup on the command line like this: -- # /usr/share/BackupPC/bin/BackupPC_dump -v -i myclient cmdSystemOrEval: about to system /usr/bin/ping -c 1 myclient cmdSystemOrEval: finished: got output PING myclient (10.0.21.18) 56(84) bytes of data. 64 bytes from myclient (10.0.21.18): icmp_seq=1 ttl=64 time=0.144 ms --- myclient ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.144/0.144/0.144/0.000 ms cmdSystemOrEval: about to system /usr/bin/ping -c 1 myclient cmdSystemOrEval: finished: got output PING myclient (10.0.21.18) 56(84) bytes of data. 64 bytes from myclient (10.0.21.18): icmp_seq=1 ttl=64 time=0.134 ms --- myclient ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.134/0.134/0.134/0.000 ms CheckHostAlive: returning 0.134 incr backup started back to 2015-10-26 18:05:18 (backup #0) for directory /home/smith started incr dump, share=/home/smith Running: /usr/bin/ssh -q -x -l root myclient /usr/bin/rsync --server --sender --numeric-ids --perms --owner --group -D --links --hard-links --times --block-size=2048 --recursive . /home/smith/ Xfer PIDs are now 9318 xferPids 9318 Rsync command pid is 9318 Got remote protocol 31 Negotiated protocol version 28 Checksum seed is 1445938945 Got checksumSeed 0x562f4701 Got file list: 615 entries Child PID is 9321 Xfer PIDs are now 9318,9321 xferPids 9318,9321 Sending csums, cnt = 615, phase = 0 Skipping .ICEauthority (same attr) Skipping .Xauthority (same attr) Skipping .bash_history (same attr) Skipping .bash_logout (same attr) Skipping .bash_profile (same attr) Skipping .bashrc (same attr) [...] Finished deltaGet phase 0 Finished deltaGet phase 1 Done: 838 files, 72752515 bytes incr backup complete -- and the backup went just fine. I can even see the list of backups I have done manually so far. What did I miss here? Fuji +-- |This was sent by lifid1...@einrot.com via Backup Central. |Forward SPAM to ab...@backupcentral.com. +-- -- ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/