I've created a user on a server where there was only root as:
# adduser user1
with a password. Then
# su - user1
And then:
$ apt-get update
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
user1@my_server:~$ sudo apt-get update
[sudo] password for user1:
user1 is not in the sudoers file. This incident will be reported.
I believe I've missed something such as add some privileges or something like that.
How to fix that?
visudo
is not a file, but program. – Jakuje May 01 '16 at 17:04/usr/sbin/visudo
, but it should not matter. It is editing/etc/sudoers
, but it should not matter either. What is the problem? – Jakuje May 01 '16 at 17:11