You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
want to write a template on osx where I runtime script as the current user, not sudo user.
I try to do this template
template "/etc/ssh/sshd_config" do
user "root"
source "templates/sshd_config.erb"
owner "root"
group "root"
mode "644"
variables(
port: ssh_server_config[:port] || 22,
permit_root_login: ssh_server_config[:permit_root_login] || "without-password",
password_authentication: password_authentication_setting,
pubkey_authentication: ssh_server_config[:pubkey_authentication] || "yes",
permit_empty_passwords: ssh_server_config[:permit_empty_passwords] || "no",
challenge_response_authentication: ssh_server_config[:challenge_response_authentication] || "no",
use_pam: ssh_server_config[:use_pam] || "yes",
allow_users: ssh_server_config[:allow_users] || user,
x11_forwarding: ssh_server_config[:x11_forwarding] || "no",
max_auth_tries: ssh_server_config[:max_auth_tries] || 3,
max_sessions: ssh_server_config[:max_sessions] || 10,
client_alive_interval: ssh_server_config[:client_alive_interval] || 300,
client_alive_count_max: ssh_server_config[:client_alive_count_max] || 3
)
end
with and without the user "root" attribute but it gives me
INFO : +# ForceCommand cvs server
INFO : \ No newline at end of file
DEBUG : Executing cp -p /tmp/1770960484.244679 /etc/ssh/sshd_config...
DEBUG : stderr | cp: /etc/ssh/sshd_config: Permission denied
ERROR : stderr | cp: /etc/ssh/sshd_config: Permission denied
ERROR : Command cp -p /tmp/1770960484.244679 /etc/ssh/sshd_config failed. (exit status: 1)
ERROR : template[/etc/ssh/sshd_config] Failed.
./bin/deploy --debug 2.96s user 1.15s system 25% cpu 16.264 total
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
want to write a template on osx where I runtime script as the current user, not sudo user.
I try to do this template
template "/etc/ssh/sshd_config" do
user "root"
source "templates/sshd_config.erb"
owner "root"
group "root"
mode "644"
variables(
port: ssh_server_config[:port] || 22,
permit_root_login: ssh_server_config[:permit_root_login] || "without-password",
password_authentication: password_authentication_setting,
pubkey_authentication: ssh_server_config[:pubkey_authentication] || "yes",
permit_empty_passwords: ssh_server_config[:permit_empty_passwords] || "no",
challenge_response_authentication: ssh_server_config[:challenge_response_authentication] || "no",
use_pam: ssh_server_config[:use_pam] || "yes",
allow_users: ssh_server_config[:allow_users] || user,
x11_forwarding: ssh_server_config[:x11_forwarding] || "no",
max_auth_tries: ssh_server_config[:max_auth_tries] || 3,
max_sessions: ssh_server_config[:max_sessions] || 10,
client_alive_interval: ssh_server_config[:client_alive_interval] || 300,
client_alive_count_max: ssh_server_config[:client_alive_count_max] || 3
)
end
with and without the user "root" attribute but it gives me
INFO : +# ForceCommand cvs server
INFO : \ No newline at end of file
DEBUG : Executing
cp -p /tmp/1770960484.244679 /etc/ssh/sshd_config...DEBUG : stderr | cp: /etc/ssh/sshd_config: Permission denied
ERROR : stderr | cp: /etc/ssh/sshd_config: Permission denied
ERROR : Command
cp -p /tmp/1770960484.244679 /etc/ssh/sshd_configfailed. (exit status: 1)ERROR : template[/etc/ssh/sshd_config] Failed.
./bin/deploy --debug 2.96s user 1.15s system 25% cpu 16.264 total
Beta Was this translation helpful? Give feedback.
All reactions