DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Installation and Upgrading

OpenBSD Installation and Upgrading Installing and upgrading OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 23rd October 2015
tab tab is offline
Port Guard
 
Join Date: Oct 2015
Posts: 15
Exclamation Only root can install with pkg_add

Hi,
I am a newbie of openbsd world and I am having some troubles.
I installed OpenBSD 5.7 amd64 on VMware with NAT network and tunneled IP because I ame under office proxy and VPN.
To go on internet I edited /myuser/.profile and /root/.profile:So, the problem is that if I log on with root user I can install new packaged by using pkg_add -i -v package_name.
If I try with my logged user, I have this error:
Quote:
Error from ftp://openbsd.mirror.garr.it/pub/Ope...ackages/amd64/
ftp: connect: No route to host
ftp: Can't connect or login to host `openbsd.mirror.garr.it'
ftp://openbsd.mirror.garr.it/pub/Ope...ackages/amd64/ is empty
Can't find python
The same command, logged as root, works!
I added my user to sudoers before of making any changes.

Thanks for your help!

Last edited by tab; 23rd October 2015 at 09:57 AM.
Reply With Quote
  #2   (View Single Post)  
Old 23rd October 2015
tab tab is offline
Port Guard
 
Join Date: Oct 2015
Posts: 15
Default

I think I have some issues with sudo. If I type from my user sudo wget www.google.com it failed.
If I type wget www.google.com it's ok.
Reply With Quote
  #3   (View Single Post)  
Old 23rd October 2015
blackhole's Avatar
blackhole blackhole is offline
Spam Deminer
 
Join Date: Mar 2014
Posts: 316
Default

Maybe post your /etc/sudoers and the complete commands and output rather than just snippets of output?
Reply With Quote
  #4   (View Single Post)  
Old 23rd October 2015
tab tab is offline
Port Guard
 
Join Date: Oct 2015
Posts: 15
Default

Of course!
This is my sudoers output:
Quote:
# $OpenBSD: sudoers,v 1.28 2014/04/08 13:26:28 espie Exp $
#
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
# Failure to use 'visudo' may result in syntax or file permission errors
# that prevent sudo from running.
#
# See the sudoers man page for the details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# Defaults specification
Defaults env_keep +="FTPMODE PKG_CACHE PKG_PATH SM_PATH SSH_AUTH_SOCK"

# Non-exhaustive list of variables needed to build release(8) and ports(7)
Defaults:%wsrc env_keep +="DESTDIR DISTDIR FETCH_CMD FLAVOR GROUP MAKE MAKECONF"
Defaults:%wsrc env_keep +="MULTI_PACKAGES NOMAN OKAY_FILES OWNER PKG_DBDIR"
Defaults:%wsrc env_keep +="PKG_DESTDIR PKG_TMPDIR PORTSDIR RELEASEDIR SHARED_ONL Y"
Defaults:%wsrc env_keep +="SUBPACKAGE WRKOBJDIR SUDO_PORT_V1"

# Uncomment to preserve the default proxy host variable
#Defaults env_keep +="ftp_proxy http_proxy"

# Uncomment to disable the lecture the first time you run sudo
#Defaults !lecture

# Uncomment to preserve the environment for users in group wheel
#Defaults:%wheel !env_reset

# Runas alias specification

# User privilege specification
root ALL=(ALL) SETENV: ALL
tab ALL=(ALL) ALL
# Uncomment to allow people in group wheel to run all commands
# and set environment variables.
# %wheel ALL=(ALL) SETENV: ALL

# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: SETENV: ALL

# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
And these are outputs of wget with and without sudo
-bash-4.3$ wget www.google.com]
Quote:
--2015-10-22 06:41:06-- http://www.google.com/
Connecting to 127.0.0.1:8080... connected.
Proxy request sent, awaiting response... 302 Found
Location: http://www.google.co.uk/?gfe_rd=cr&e...OsnH8geB16WgCA [followin g]
--2015-10-22 06:41:06-- http://www.google.co.uk/?gfe_rd=cr&ei=cP0pVonvOsnH8geB1 6WgCA
Reusing existing connection to 127.0.0.1:8080.
Proxy request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: 'index.html.1'

index.html.1 [ <=> ] 18.54K --.-KB/s in 0.09s

2015-10-22 06:41:06 (199 KB/s) - 'index.html.1' saved [18986]

-bash-4.3$ --2015-10-22 06:41:06-- http://www.google.com/
-bash: --2015-10-22: command not found
-bash-4.3$ Connecting to 127.0.0.1:8080... connected.
-bash: Connecting: command not found
-bash-4.3$ Proxy request sent, awaiting response... 302 Found
-bash: Proxy: command not found
-bash-4.3$ Location: http://www.google.co.uk/?gfe_rd=cr&e...vOsnH8geB16WgC A [following]
[1] 13353
-bash: Location:: command not found
-bash: [following]: command not found
[1]+ Exit 127 Location: http://www.google.co.uk/?gfe_rd=cr
-bash-4.3$ --2015-10-22 06:41:06-- http://www.google.co.uk/?gfe_rd=cr&ei=cP0pVo nvOsnH8geB16WgCA
[1] 28169
-bash: --2015-10-22: command not found
-bash-4.3$ Reusing existing connection to 127.0.0.1:8080.
-bash: Reusing: command not found
[1]+ Exit 127 --2015-10-22 06:41:06-- http://www.google.co.uk/?g fe_rd=cr
-bash-4.3$ Proxy request sent, awaiting response... 200 OK
-bash: Proxy: command not found
-bash-4.3$ Length: unspecified [text/html]
-bash: Length:: command not found
-bash-4.3$ Saving to: 'index.html.1'
-bash: Saving: command not found
-bash-4.3$
-bash-4.3$ index.html.1 [ <=> ] 18.54K --.-KB/s in 0.09s
-bash: =: No such file or directory
-bash-4.3$
-bash-4.3$ 2015-10-22 06:41:06 (199 KB/s) - 'index.html.1' saved [18986]
# sudo wget www.google.com
-bash-4.3$ sudo wget www.google.com
--2015-10-22 06:43:39-- http://www.google.com/
Resolving www.google.com (www.google.com)... 74.125.196.104, 74.125.196.106, 74.125.196.105, ...
Connecting to www.google.com (www.google.com)|74.125.196.104|:80... failed: Connection refused.
Reply With Quote
  #5   (View Single Post)  
Old 23rd October 2015
tab tab is offline
Port Guard
 
Join Date: Oct 2015
Posts: 15
Default

I found the solution!
I uncommented this line in /etc/sudoers
Quote:
# Uncomment to preserve the default proxy host variable
Defaults env_keep +="ftp_proxy http_proxy"
I hope it's useful for others!
Reply With Quote
  #6   (View Single Post)  
Old 23rd October 2015
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by tab View Post
I installed OpenBSD 5.7...
Welcome!

While OpenBSD 5.7 is still fully supported by the OpenBSD project for another six months, recognize that OpenBSD 5.8 has recently been released:

http://daemonforums.org/showthread.php?t=9451

Information on OpenBSD's development model can be found in Section 5.1 of the official FAQ. In fact, this is the single best source for general information on OpenBSD available.
Reply With Quote
Reply

Tags
pkg_add, proxy, tunnel

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Makefile for Vermaden's FreeBSD ZFS root install adapted for 4K sector disks J65nko Guides 6 5th August 2013 08:51 PM
pkg_add times out (?) Daffy OpenBSD Packages and Ports 0 27th July 2012 09:41 PM
pkg_add --PREFIX ? sharris FreeBSD General 2 25th July 2011 04:31 PM
My version of pkg_add :) DNAeon FreeBSD Ports and Packages 26 15th October 2008 06:58 AM
pkg_add g95;g95 x.f95: cannot find g95 enpey OpenBSD Packages and Ports 8 27th August 2008 12:48 AM


All times are GMT. The time now is 05:55 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick