How can I install program from other user?
su - test
sudo apt-get update
sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the ‘nosuid’ option set or an NFS file system without root privileges?
How can I execute program from other user UBUNTU 18.04?
Hi @masteritua,
Can you say a bit more about how you got to that error? Is this an Ubuntu container deployed via a 3Bot or through a VDC?
I’m not sure if it’s possible to change the ‘nosuid’ option in either case. Perhaps installing packages as root would work just as well?
I use solution - Ubuntu container deployed via a 3Bot
I have also other error, when I try to execute comand down:
apt upgrade
dpkg: error processing package libc-bin (–configure):
installed libc-bin package post-installation script subprocess returned error e
xit status 134
Errors were encountered while processing:
libc-bin
E: Sub-process /usr/bin/dpkg returned an error code (1)
Then I try to install
apt-get --reinstall install libc-bin
Reading package lists… Done
Building dependency tree
Reading state information… Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 51 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for libc-bin:amd64
Then I try to install
apt install sudo
And also get that error
dpkg: error processing package libc-bin (–configure):
installed libc-bin package post-installation script subprocess returned error e
xit status 134
Errors were encountered while processing:
libc-bin
E: Sub-process /usr/bin/dpkg returned an error code (1)
Then I try to install docker
apt-get install docker
Reading package lists… Done
Building dependency tree
Reading state information… Done
docker is already the newest version (1.5-1build1).
0 upgraded, 0 newly installed, 0 to remove and 51 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up libc-bin (2.27-3ubuntu1.4) …
Aborted
/sbin/ldconfig.real: Can’t stat /usr/local/lib/x86_64-linux-gnu: No such file or directory
/sbin/ldconfig.real: Path /lib/x86_64-linux-gnu' given more than once /sbin/ldconfig.real: Path
/usr/lib/x86_64-linux-gnu’ given more than once
/usr/local/lib:
/lib/x86_64-linux-gnu:
Aborted
dpkg: error processing package libc-bin (–configure):
installed libc-bin package post-installation script subprocess returned error exit status 134
Errors were encountered while processing:
libc-bin
E: Sub-process /usr/bin/dpkg returned an error code (1)
I’m not sure if it’s possible to change the ‘nosuid’ option in either case. Perhaps installing packages as root would work just as well?
- NO, I got the errors above!
Try using a larger root disk size for your ubuntu image.
From my 3bot I deployed 18.04 with root disk size ~ 20GB
[#] ip link add grid type wireguard
[#] wg setconf grid /dev/fd/63
[#] ip -4 address add 100.64.80.1/32 dev grid
[#] ip link set mtu 1420 up dev grid
[#] ip -4 route add 100.64.80.0/32 dev grid
[#] ip -4 route add 10.80.0.0/16 dev grid
➜ ~ ping ssh root@10.80.2.2
ping: root@10.80.2.2: Name or service not known
➜ ~ ssh root@10.80.2.2
Warning: Permanently added '10.80.2.2' (ECDSA) to the list of known hosts.
Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 5.4.10-Zero-OS x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
This system has been minimized by removing packages and content that are
not required on a system that users do not log into.
To restore this content, you can run the 'unminimize' command.
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
root@zosv2-02:~#
root@zosv2-02:~#
root@zosv2-02:~# apt update
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:4 http://be.archive.ubuntu.com/ubuntu bionic InRelease
Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
64 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@zosv2-02:~# apt install stow
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libgdbm-compat4 libgdbm5 libperl5.26 netbase perl perl-base perl-modules-5.26
Suggested packages:
gdbm-l10n perl-doc libterm-readline-gnu-perl | libterm-readline-perl-perl make
doc-base
The following NEW packages will be installed:
libgdbm-compat4 libgdbm5 libperl5.26 netbase perl perl-modules-5.26 stow
The following packages will be upgraded:
perl-base
1 upgraded, 7 newly installed, 0 to remove and 63 not upgraded.
Need to get 8284 kB of archives.
After this operation, 42.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 perl-base amd64 5.26.1-6ubuntu0.5 [1391 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 perl-modules-5.26 all 5.26.1-6ubuntu0.5 [2762 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic/main amd64 libgdbm5 amd64 1.14.1-6 [26.0 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic/main amd64 libgdbm-compat4 amd64 1.14.1-6 [6084 B]
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libperl5.26 amd64 5.26.1-6ubuntu0.5 [3534 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 perl amd64 5.26.1-6ubuntu0.5 [201 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic/main amd64 netbase all 5.4 [12.7 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic/universe amd64 stow all 2.2.2-1 [350 kB]
Fetched 8284 kB in 0s (19.5 MB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 11819 files and directories currently installed.)
Preparing to unpack .../perl-base_5.26.1-6ubuntu0.5_amd64.deb ...
Progress: [ 2%] [#.................................................................]
Setting up perl-base (5.26.1-6ubuntu0.5) ...........................................]
Selecting previously unselected package perl-modules-5.26.
(Reading database ... 11819 files and directories currently installed.)
Preparing to unpack .../0-perl-modules-5.26_5.26.1-6ubuntu0.5_all.deb ...
Unpacking perl-modules-5.26 (5.26.1-6ubuntu0.5) ...
Selecting previously unselected package libgdbm5:amd64.
Preparing to unpack .../1-libgdbm5_1.14.1-6_amd64.deb ...
Unpacking libgdbm5:amd64 (1.14.1-6) ...
Selecting previously unselected package libgdbm-compat4:amd64.
Preparing to unpack .../2-libgdbm-compat4_1.14.1-6_amd64.deb ...
Unpacking libgdbm-compat4:amd64 (1.14.1-6) ...
Selecting previously unselected package libperl5.26:amd64.
Preparing to unpack .../3-libperl5.26_5.26.1-6ubuntu0.5_amd64.deb ...
Unpacking libperl5.26:amd64 (5.26.1-6ubuntu0.5) ...
Selecting previously unselected package perl.
Preparing to unpack .../4-perl_5.26.1-6ubuntu0.5_amd64.deb ...
Unpacking perl (5.26.1-6ubuntu0.5) ...
Selecting previously unselected package netbase.
Preparing to unpack .../5-netbase_5.4_all.deb ...
Unpacking netbase (5.4) ...
Selecting previously unselected package stow.
Preparing to unpack .../6-stow_2.2.2-1_all.deb ...
Unpacking stow (2.2.2-1) ...
Setting up perl-modules-5.26 (5.26.1-6ubuntu0.5) ...
Setting up libgdbm5:amd64 (1.14.1-6) ...
Setting up libgdbm-compat4:amd64 (1.14.1-6) ...
Setting up netbase (5.4) ...
Setting up libperl5.26:amd64 (5.26.1-6ubuntu0.5) ...
Setting up perl (5.26.1-6ubuntu0.5) ...
Setting up stow (2.2.2-1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
root@zosv2-02:~# stow -h
stow (GNU Stow) version 2.2.2
SYNOPSIS:
stow [OPTION ...] [-D|-S|-R] PACKAGE ... [-D|-S|-R] PACKAGE ...
OPTIONS:
-d DIR, --dir=DIR Set stow dir to DIR (default is current dir)
-t DIR, --target=DIR Set target to DIR (default is parent of stow dir)
-S, --stow Stow the package names that follow this option
-D, --delete Unstow the package names that follow this option
-R, --restow Restow (like stow -D followed by stow -S)
--ignore=REGEX Ignore files ending in this Perl regex
--defer=REGEX Don't stow files beginning with this Perl regex
if the file is already stowed to another package
--override=REGEX Force stowing files beginning with this Perl regex
if the file is already stowed to another package
--adopt (Use with care!) Import existing files into stow package
from target. Please read docs before using.
-p, --compat Use legacy algorithm for unstowing
-n, --no, --simulate Do not actually make any filesystem changes
-v, --verbose[=N] Increase verbosity (levels are 0,1,2,3;
-v or --verbose adds 1; --verbose=N sets level)
-V, --version Show stow version number
-h, --help Show this help
Report bugs to: bug-stow@gnu.org
Stow home page: <http://www.gnu.org/software/stow/>
General help using GNU software: <http://www.gnu.org/gethelp/>
root@zosv2-02:~#
and on one with small disk 256M
➜ ~ ssh root@10.80.3.2
Warning: Permanently added '10.80.3.2' (ECDSA) to the list of known hosts.
Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 5.4.10-Zero-OS x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
This system has been minimized by removing packages and content that are
not required on a system that users do not log into.
To restore this content, you can run the 'unminimize' command.
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
root@zosv2-08:~#
root@zosv2-08:~#
root@zosv2-08:~# apt update
Hit:1 http://be.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
64 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@zosv2-08:~# apt install stow
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libgdbm-compat4 libgdbm5 libperl5.26 netbase perl perl-base perl-modules-5.26
Suggested packages:
gdbm-l10n perl-doc libterm-readline-gnu-perl | libterm-readline-perl-perl make
doc-base
The following NEW packages will be installed:
libgdbm-compat4 libgdbm5 libperl5.26 netbase perl perl-modules-5.26 stow
The following packages will be upgraded:
perl-base
1 upgraded, 7 newly installed, 0 to remove and 63 not upgraded.
Need to get 8284 kB of archives.
After this operation, 42.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 perl-base amd64 5.26.1-6ubuntu0.5 [1391 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 perl-modules-5.26 all 5.26.1-6ubuntu0.5 [2762 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic/main amd64 libgdbm5 amd64 1.14.1-6 [26.0 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic/main amd64 libgdbm-compat4 amd64 1.14.1-6 [6084 B]
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libperl5.26 amd64 5.26.1-6ubuntu0.5 [3534 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 perl amd64 5.26.1-6ubuntu0.5 [201 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic/main amd64 netbase all 5.4 [12.7 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic/universe amd64 stow all 2.2.2-1 [350 kB]
Fetched 8284 kB in 0s (20.0 MB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 11819 files and directories currently installed.)
Preparing to unpack .../perl-base_5.26.1-6ubuntu0.5_amd64.deb ...
Unpacking perl-base (5.26.1-6ubuntu0.5) over (5.26.1-6ubuntu0.3) ...
Setting up perl-base (5.26.1-6ubuntu0.5) ...
Selecting previously unselected package perl-modules-5.26.
(Reading database ... 11819 files and directories currently installed.)
Preparing to unpack .../0-perl-modules-5.26_5.26.1-6ubuntu0.5_all.deb ...
Unpacking perl-modules-5.26 (5.26.1-6ubuntu0.5) ...
dpkg: error processing archive /tmp/apt-dpkg-install-z9skk6/0-perl-modules-5.26_5.26.1-6
ubuntu0.5_all.deb (--unpack):
unable to install new version of '/usr/share/perl/5.26.1/unicore/lib/Perl/_PerlPat.pl':
Disk quota exceeded
Selecting previously unselected package libgdbm5:amd64.
Preparing to unpack .../1-libgdbm5_1.14.1-6_amd64.deb ...
Unpacking libgdbm5:amd64 (1.14.1-6) ...
Selecting previously unselected package libgdbm-compat4:amd64.
Preparing to unpack .../2-libgdbm-compat4_1.14.1-6_amd64.deb ...
Unpacking libgdbm-compat4:amd64 (1.14.1-6) ...
Selecting previously unselected package libperl5.26:amd64.
Preparing to unpack .../3-libperl5.26_5.26.1-6ubuntu0.5_amd64.deb ...
Unpacking libperl5.26:amd64 (5.26.1-6ubuntu0.5) ...
Selecting previously unselected package perl.
Preparing to unpack .../4-perl_5.26.1-6ubuntu0.5_amd64.deb ...
Unpacking perl (5.26.1-6ubuntu0.5) ...
Selecting previously unselected package netbase.
Preparing to unpack .../5-netbase_5.4_all.deb ...
Unpacking netbase (5.4) ...
Selecting previously unselected package stow.
Preparing to unpack .../6-stow_2.2.2-1_all.deb ...
Unpacking stow (2.2.2-1) ...
Errors were encountered while processing:
/tmp/apt-dpkg-install-z9skk6/0-perl-modules-5.26_5.26.1-6ubuntu0.5_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@zosv2-08:~#
Also @masteritua I don’t think you can install docker in non-privileged containers
but for your question to allow sudoers to install packages: I also don’t think the filesystem supports suid nor cap admin, @azmy @maxux42 any idea?
If I get your question correctly, you are asking if you can do apt-get install a pkg with the test
user. The answer is that you can’t. Only root users can install packages, hence I am wondering why is the reason you try to su - test
before u run the apt-get
command.
If you really want to do so then what u need to do is the following:
this of course depends on the flist used. I assume you use the ubuntu solution
- as root, first make sure the
sudo
pkg is installed - configure the
/etc/sudoers
to give the specified user the permission to run apt-get (out of scope of this forum, but there are many resource online) - make sure the
setuid
flag is set on thesudo
file. (that’s the error that is shown in your message) this should be easily done (as root) by doingchmod u+s /usr/bin/sudo
. - now switch to the needed user with
su - test
- as this user you should be able to do
sudo apt-get install <pkg>
if everything is configured correctly.
I hope this will help
Pleasd bear in mind that you can also create an extra 3bot with admin rights on your 3bot. Then someone else can run the dashboard on your behalf.
I’ve tried running Docker in an Ubuntu container like this. Install works, but attempting to run containers gives an error.
@masteritua, if you need to run containers on the Grid, there’s a way to convert Docker images to native flist images using the flist hub. Another option is to deploy them via Kubernetes inside an eVDC (still on testnet).
I have interesting problem:
What I did:
- Remove old container Ubuntu from 3bot
- Create a new 3bot container UBUNTU 18.04 with params: 10 GB memory and root file
Which characteristics I got in a new container UBUNTU, although must be 10 GB
root@cluster05:~# free -h
total used free shared buff/cache available
Mem: 188G 1.4G 184G 821M 2.7G 185G
Swap: 0B 0B 0B
Why when Do I execute command in new container Ubuntu, I have this problem yet:
dpkg: error processing package libc-bin (–configure):
installed libc-bin package post-installation script subprocess returned error exit status 134
Errors were encountered while processing:
libc-bin
E: Sub-process /usr/bin/dpkg returned an error code (1)
Very interesting!!!
When I want looking history, I got it from old container UBUNTU ???
root@cluster05:~# history
1 apt-get update
2 apt-get install -y openssh-server
3 apt-get install vim
4 vim start.sh
5 ls
6 vim /etc/apt/sources.list
7 apt install docker
8 docker ps
9 docker
10 apt upgrade
11 history
root@cluster05:~#
How to full update container UBUNTU ?
Note that commands like free
and df
are going to show you information about the node your container is running on, not just resources allocated to your container.
As for the history, those first six lines are an artifact from when the container image was created. They show when I deploy Ubuntu as well. If you’ve executed the commands after #6 in this new container, then that’s all normal.
I tried the same steps and wasn’t able to reproduce your error. apt-get upgrade
completes without issue. For reference, here is how I set the container resource allocation: