Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure sudo #27

Open
jgoffaux opened this issue Jul 18, 2011 · 5 comments
Open

Configure sudo #27

jgoffaux opened this issue Jul 18, 2011 · 5 comments

Comments

@jgoffaux
Copy link

Hello,

During setup, if you select 'N' to configure sudo
The treatment will still try to configure it.

[..]
Do users have to accept TOS when connecting for the first time [Y] ?   
Allow remote command [Y] ?   
Allow remote administration CLI [Y] nfigure sudo with NOPASSWD to launch remote admin CLI [Y] ?  N


- Reload configuration ... OK
- Installing sshGate ... OK
- Generate default sshkey pair ... OK
- Setup files permissions ... OK
- Install archive cron ... OK
- configure /etc/sudoers ... ./install.sh: line 203: /etc/sudoers: Aucun fichier ou dossier de ce type
mv: impossible d'évaluer « /tmp/sudoers.26708 »: Aucun fichier ou dossier de ce type
OK

Thanks

@Tauop
Copy link
Owner

Tauop commented Jul 19, 2011

I have to remove this. This project has to not be dependent of sudo.

@Tauop
Copy link
Owner

Tauop commented Jul 19, 2011

Can you add this patch, run install.sh and return me the result pls ?

tauop@Tauopbox:/tmp$ diff -au install.sh.orig install.sh
--- install.sh.orig     2011-07-19 12:45:12.254033943 +0200
+++ install.sh  2011-07-19 12:46:08.293300387 +0200
@@ -196,6 +196,7 @@
   chmod +x /etc/cron.monthly/archive-log.sh
 OK

+set -x
 if [ "${SSHGATE_USE_REMOTE_ADMIN_CLI}" = 'Y' -a "${action}" = 'install' ]; then
   DOTHIS 'configure /etc/sudoers'
     file="/tmp/sudoers.${RANDOM}"
@@ -208,6 +209,8 @@
   OK
 fi

+set +x
+
 if [ -z "$( ls -1 "${SSHGATE_DIR_USERS}" )" ]; then
   # FIXME: ugly => load all sshGate, like the CLI :-(
   __SSHGATE_SETUP__=

@jgoffaux
Copy link
Author

Is it possible that this is due to 'dash':

root@bastion:/opt/sshgate# ls -ail /bin/sh
8200 lrwxrwxrwx 1 root root 4 18 juil. 13:13 /bin/sh -> dash

I run the test and send it in a few days

Thanks

@jgoffaux
Copy link
Author

Hello,

Here's the back:

Configure sudo with NOPASSWD to launch remote admin CLI [N] ?


- Reload configuration ... OK
- Installing sshGate ... OK
- Generate default sshkey pair ... OK
- Setup files permissions ... OK
- Install archive cron ... OK
+ '[' Y = Y -a install = install ']'
+ DOTHIS 'configure /etc/sudoers'
+ MESSAGE --no-break --no-indent -- '- configure /etc/sudoers ... '
+ local do_print=true do_log=true do_indent=true 'cbreak=\n'
+ local msg= date=
++ date '+[%D %T]'
+ date='[07/21/11 13:41:14]'
+ '[' true ']'
+ '[' 4 -eq 0 ']'
+ case "$1" in
+ shift
+ cbreak=
+ '[' true ']'
+ '[' 3 -eq 0 ']'
+ case "$1" in
+ shift
+ do_indent=false
+ '[' true ']'
+ '[' 2 -eq 0 ']'
+ case "$1" in
+ shift
+ break
+ msg='- configure /etc/sudoers ... '
+ '[' false = true ']'
+ '[' true = true ']'
+ printf %s '- configure /etc/sudoers ... '
- configure /etc/sudoers ... + '[' true = true -a -f '' ']'
+ __IN_DOTHIS__=true
+ file=/tmp/sudoers.7359
+ '[' N = Y ']'
+ sudo_no_passwd=
+ grep -v '^sshgate '
./install.sh: line 204: /etc/sudoers: Aucun fichier ou dossier de ce type
+ mv /tmp/sudoers.7359 /etc/sudoers
mv: impossible d'évaluer « /tmp/sudoers.7359 »: Aucun fichier ou dossier de ce type
+ echo 'sshgate ALL=(root) /opt/sshgate/bin/sshgate-cli'
+ chmod 0440 /etc/sudoers
+ rm -f /tmp/sudoers.7359
+ OK
+ '[' true = true ']'
+ MESSAGE --no-date --no-indent -- OK
+ local do_print=true do_log=true do_indent=true 'cbreak=\n'
+ local msg= date=
++ date '+[%D %T]'
+ date='[07/21/11 13:41:14]'
+ '[' true ']'
+ '[' 4 -eq 0 ']'
+ case "$1" in
+ shift
+ date=
+ '[' true ']'
+ '[' 3 -eq 0 ']'
+ case "$1" in
+ shift
+ do_indent=false
+ '[' true ']'
+ '[' 2 -eq 0 ']'
+ case "$1" in
+ shift
+ break
+ msg=OK
+ '[' false = true ']'
+ '[' true = true ']'
+ printf '%s\n' OK
OK
+ '[' true = true -a -f '' ']'
+ __IN_DOTHIS__=false
+ set +x

root@bastion:/bin# ls -ail sh
286728 lrwxrwxrwx 1 root root 4 21 juil. 13:17 sh -> dash

@Tauop
Copy link
Owner

Tauop commented Jul 21, 2011

Seems you don't have /etc/sudoers file. I will remove sudo dependency (it sucks)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants