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

sudo apt-vim init installed everything in /root #39

Closed
caseydentinger opened this issue Jun 15, 2016 · 9 comments
Closed

sudo apt-vim init installed everything in /root #39

caseydentinger opened this issue Jun 15, 2016 · 9 comments
Labels

Comments

@caseydentinger
Copy link

I do not have always_set_home in sudoers so I think it might be a problem with the script. I am on Debian Stretch and Python 2.7.11+

@egalpin egalpin added the bug label Jun 15, 2016
@egalpin
Copy link
Owner

egalpin commented Jun 15, 2016

Good catch. I should be able to quite easily determine which user is is calling sudo and install for that user. Thanks!

@egalpin
Copy link
Owner

egalpin commented Jun 28, 2016

@caseydentinger In thinking about this further, I'm wondering what the best solution is. It's possible that someone would want to install as root; I don't feel I should stop someone from doing so. sudo -E could be used if it was desirable to install apt-vim for a given user while providing super user privileges.

Would love to get your input!

@caseydentinger
Copy link
Author

@egalpin what if you did this in the heredoc instead of using the module
which expands to /root (I think because of sudo python?):

HOME = "${HOME}"

I might be missing something...

On Tue, Jun 28, 2016 at 8:14 AM, egalpin notifications@github.com wrote:

@caseydentinger https://github.com/caseydentinger In thinking about
this further, I'm wondering what the best solution is. It's possible that
someone would want to install as root; I don't feel I should stop someone
from doing so. sudo -E could be used if it was desirable to install
apt-vim for a given user while providing super user privileges.

Would love to get your input~


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#39 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AAIv9A_jtnEVeDZj1bqocqXfQQy0H9Xwks5qQSwtgaJpZM4I2udg
.

@egalpin
Copy link
Owner

egalpin commented Jun 28, 2016

I think the root of this problem is actually a mistake (my mistake) in the manual installation doc. I've updated it here to reflect the fact that sudo is not actually required for the whole installation, but rather just the copying of the apt-vim script to /usr/local/bin. I've also updated install.sh to include a -E flag for sudo.

Would you care to give it a whirl? I can run it in a VM, but would love to know if this fixes the specific issue you're seeing

@caseydentinger
Copy link
Author

What about setting PATH to include ~/.vimpkg/bin? Would that eliminate
needing sudo at all? I believe adding it to .profile would be reasonably
portable.

On Tue, Jun 28, 2016 at 8:56 AM, egalpin notifications@github.com wrote:

I think the root of this problem is actually a mistake (my mistake) in the
manual installation doc. I've updated it (here)[
https://github.com/egalpin/apt-vim/blob/master/README.md#option-2---manual)
to reflect the fact that sudo is not actually required for the whole
installation, but rather just the copying of the apt-vim script to
/usr/local/bin. I've also updated (install.sh)[
https://github.com/egalpin/apt-vim/blob/master/install.sh#L40] to include
a -E flag for sudo.

Would you care to give it a whirl? I can run it in a VM, but would love to
know if this fixes your specific issue


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#39 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AAIv9CwsPw_uGnjcCFLeidosNozVI-bXks5qQTYJgaJpZM4I2udg
.

@egalpin
Copy link
Owner

egalpin commented Jun 28, 2016

I like this idea a lot. Any time you can install software without super user privileges, it's a win. Just spinning up a VM to test out some changes. Thanks for the feedback

egalpin pushed a commit that referenced this issue Jun 28, 2016
- remove all instances of sudo
egalpin pushed a commit that referenced this issue Jun 28, 2016
egalpin pushed a commit that referenced this issue Jun 28, 2016
egalpin pushed a commit that referenced this issue Jun 28, 2016
egalpin pushed a commit that referenced this issue Jun 28, 2016
egalpin pushed a commit that referenced this issue Jun 28, 2016
egalpin pushed a commit that referenced this issue Jun 28, 2016
egalpin pushed a commit that referenced this issue Jun 28, 2016
egalpin pushed a commit that referenced this issue Jun 28, 2016
egalpin pushed a commit that referenced this issue Jun 28, 2016
egalpin pushed a commit that referenced this issue Jun 28, 2016
egalpin pushed a commit that referenced this issue Jun 28, 2016
egalpin pushed a commit that referenced this issue Jun 28, 2016
egalpin pushed a commit that referenced this issue Jun 28, 2016
egalpin pushed a commit that referenced this issue Jun 28, 2016
egalpin pushed a commit that referenced this issue Jun 29, 2016
egalpin pushed a commit that referenced this issue Jun 29, 2016
egalpin pushed a commit that referenced this issue Jun 29, 2016
egalpin pushed a commit that referenced this issue Jun 29, 2016
@egalpin
Copy link
Owner

egalpin commented Jun 29, 2016

@caseydentinger Please see #40 :-)

The only use of sudo now is in dependency installation (i.e. installing vim and git). These can be opted out of by a user.

@caseydentinger
Copy link
Author

Much nicer! Glad I could help!

@egalpin
Copy link
Owner

egalpin commented Jun 29, 2016

Thanks a bunch for your input, closing this issue off :-)

@egalpin egalpin closed this as completed Jun 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants