Sponsored Content
Operating Systems Linux Setting Up Google 2F Authentication for Automated (Crontab) rsync Post 303038426 by Neo on Tuesday 3rd of September 2019 04:10:17 AM
Old 09-03-2019
As a temporary measure I used this line before the auth required pam_google_authenticator.so line in /etc/pam.d/sshd

Code:
auth [success=done default=ignore] pam_succeed_if.so uid = 3333

This effectively permits the user with uid 3333 to bypass 2FA.

I will keep working / looking for / thinking about a different solution which does not bypass 2FA and instead passes the 2FA token for rsync.
This User Gave Thanks to Neo For This Post:
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Setting crontab

Hey all, I would like to know how to set a cron job to run from 8:15 am to 4:00 pm? Or do I have to do this in 2 seperates cron? Thanks! (4 Replies)
Discussion started by: mpang_
4 Replies

2. Linux

Setting up crontab, still cant get it to work

OK I have been working on this simple action for a while and I cannot get it to work. First off im new to the linux command line world. I feel like I am missing something simple. What I am trying to achieve is that I want this command: tcpdump -s2000 -w'flowroute-%H%M.pcap' -G900 -W36 &to... (13 Replies)
Discussion started by: Nasasdge
13 Replies

3. Shell Programming and Scripting

Crontab setting error

Hi All, I have created crontab using following steps- 1) crontab -e (edited the file with) 0 10 * * 1-5 /home/user01/exercise/cron.sh 2) then saved this file with :wq 3) cron.sh contains the code- #!/bin/bash DAY=`date +%a` mkdir abc_${DAY} 4) done the execut permision... (3 Replies)
Discussion started by: pspriyanka
3 Replies

4. UNIX for Dummies Questions & Answers

Need some help on setting up rsync

I need to "sync" a directory from a prod server to a test server. Rsync is working but it prompts for a password and I'd like to automate the process. The directory on the prod/source server is owned by root, and some subdirectories are only readable by root. On the test/destination servers, I can... (1 Reply)
Discussion started by: LAToro
1 Replies

5. UNIX for Advanced & Expert Users

Error while running Rsync through Crontab

hi All, i have implemented Rsync in my source and destination server. while running through command prompt it is working fine: ksh rsync_bravo_db.ksh usa0300uz1252.apps.mc.xerox.com /uv1402/u207/home/bravodba/bin/rsync-3.0.9/config/mrsx_rsync.cfg but later on i created a another ksh and... (4 Replies)
Discussion started by: lovelysethii
4 Replies

6. UNIX for Dummies Questions & Answers

Crontab setting

Hi Team, Please help me to set one script in crontab. I have one script and inside script, its creating one log file for saving ouptut of script. i have to out that script in crontab. When i put the script in cronatab, it executed and log file created but no data in log. like this i put in... (3 Replies)
Discussion started by: shivshankar
3 Replies

7. Linux

Trouble setting up basic user authentication on apache2 web server

Hey guys! So I decided to set up some basic user authentication on my apache2 server, and I am running into some problems. I followed the documentation provided by apache on their website, but I cant create the password file for some reason. I did a little trouble shooting myself, and found... (40 Replies)
Discussion started by: LinuxIntern445
40 Replies

8. Shell Programming and Scripting

Crontab setting

Hi All, Can anyone tell me how to schedule the dbshell.sh script to run on sunday. I have scheduled as 1 19 7 * * /home/svr/dbshell.sh. kindly confirm confirm whether coded "7" or it should set to '0'. unix:$ crontab -l 0 19 6 * * /home/svr/dbemail.sh 1 19 7 * * /home/svr/dbshell.sh (2 Replies)
Discussion started by: arun888
2 Replies

9. UNIX for Advanced & Expert Users

Crontab authentication failure

Dear all, I noticed in syslog that i receive authentication failure from cron: Mar 11 23:19:01 s1 CRON28789]: Authentication failure Mar 11 23:19:01 s1 cron: Authentication failure Mar 11 23:19:01 s1 cron: Authentication failure Mar 11 23:19:01 s1 CRON: Authentication failure Mar 11... (3 Replies)
Discussion started by: mydove
3 Replies
PAM_SUCCEED_IF(8)						     Linux-PAM							 PAM_SUCCEED_IF(8)

NAME
pam_succeed_if - test account characteristics SYNOPSIS
pam_succeed_if.so [flag...] [condition...] DESCRIPTION
pam_succeed_if.so is designed to succeed or fail authentication based on characteristics of the account belonging to the user being authenticated. One use is to select whether to load other modules based on this test. The module should be given one or more conditions as module arguments, and authentication will succeed only if all of the conditions are met. OPTIONS
The following flags are supported: debug Turns on debugging messages sent to syslog. use_uid Evaluate conditions using the account of the user whose UID the application is running under instead of the user being authenticated. quiet Don't log failure or success to the system log. quiet_fail Don't log failure to the system log. quiet_success Don't log success to the system log. audit Log unknown users to the system log. Conditions are three words: a field, a test, and a value to test for. Available fields are user, uid, gid, shell, home and service: field < number Field has a value numerically less than number. field <= number Field has a value numerically less than or equal to number. field eq number Field has a value numerically equal to number. field >= number Field has a value numerically greater than or equal to number. field > number Field has a value numerically greater than number. field ne number Field has a value numerically different from number. field = string Field exactly matches the given string. field != string Field does not match the given string. field =~ glob Field matches the given glob. field !~ glob Field does not match the given glob. field in item:item:... Field is contained in the list of items separated by colons. field notin item:item:... Field is not contained in the list of items separated by colons. user ingroup group User is in given group. user notingroup group User is not in given group. user innetgr netgroup (user,host) is in given netgroup. user notinnetgr group (user,host) is not in given netgroup. MODULE TYPES PROVIDED
All module types (account, auth, password and session) are provided. RETURN VALUES
PAM_SUCCESS The condition was true. PAM_AUTH_ERR The condition was false. PAM_SERVICE_ERR A service error occurred or the arguments can't be parsed correctly. EXAMPLES
To emulate the behaviour of pam_wheel, except there is no fallback to group 0: auth required pam_succeed_if.so quiet user ingroup wheel Given that the type matches, only loads the othermodule rule if the UID is over 500. Adjust the number after default to skip several rules. type [default=1 success=ignore] pam_succeed_if.so quiet uid > 500 type required othermodule.so arguments... SEE ALSO
glob(7), pam(7) AUTHOR
Nalin Dahyabhai <nalin@redhat.com> Linux-PAM 06/04/2011 PAM_SUCCEED_IF(8)
All times are GMT -4. The time now is 11:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy