Some systems may be able to resolve users from centralized services, but
need additional steps to allow them to log into the shell node. We then
expect that allowed users should already have their HOME directories created
before doing any syncing.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima@curii.com>
end
homedir = pwnam[l[:username]].dir
+ if !File.exist?(homedir)
+ STDERR.puts "Home directory #{homedir} from user #{username} doesn't exist. Skipping."
+ next
+ end
userdotssh = File.join(homedir, ".ssh")
Dir.mkdir(userdotssh) if !File.exist?(userdotssh)