LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 04-09-2020, 01:07 AM   #1
DownSouth
LQ Newbie
 
Registered: Apr 2020
Posts: 3

Rep: Reputation: Disabled
10.3 Terminal problem


Installed 32bit Deb 10.3 on 16GB USB via net install CD. Install went well.

First boot, all appeared fine - Net access etc. all OK. Looked to be a nice
responsive up-to-date system. Have re-booted several times and all OK.

Then i went to the terminal... and it refused to accept the root password.
I know this password is OK because I used it to access Synaptic which also
requires root password..

Checking this and other forums, discovered that "sudo" is no longer used
and has been replaced by "su' - but after experimenting, the only thing this
does is allow me to switch to username - so still no command funtions.

EG: If after switching to "username" I type "apt-get clean" it tells me...

E: Could not open lock file /var/cache/apt/archives/lock - open (13: Permission denied)
E: Unable to lock directory /var/cache/apt/archives/
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)

And I assume these messages are a result of using my normal log-in password for
the switch to username, rather than the root password for access to the terminal
to use commands, even though this is the only time it's accepted ANY password.


As I've had no problems with the terminal in any other versions of Linus that I've installed, I'm wondering
just what is wrong. Everything, apart from the terminal, appears fine and functions properly.


Anyone have any plain-English solutions to this problem?


And er - hello BTW.
 
Old 04-09-2020, 02:50 AM   #2
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: A few
Posts: 4,962

Rep: Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481
Quote:
Originally Posted by DownSouth View Post
Then i went to the terminal
What do you mean by that? Did you open a terminal window? Did you access a text console? Perhaps a serial terminal? What exactly did you do to "go to the terminal"?

It is possible that whatever terminal you used is blocked from root access. The file /etc/securetty contains terminals where root access is allowed.
Quote:
Checking this and other forums, discovered that "sudo" is no longer used
and has been replaced by "su'
I don't think so. You can easily install sudo.
Quote:
- but after experimenting, the only thing this
does is allow me to switch to username - so still no command funtions.
su allows you to switch to root, normally. Although it can be configured so that it doesn't.
Quote:
EG: If after switching to "username" I type "apt-get clean" it tells me...

E: Could not open lock file /var/cache/apt/archives/lock - open (13: Permission denied)
...
That's normal. These actions require superuser privileges, which username probably doesn't have.

Quote:
Anyone have any plain-English solutions to this problem?
Log on as username, type su, type the superuser password and you are in business. If this doesn't work, I am interested in the content of /etc/pam.d/su, the file that configures who is allowed to become root.

Or log on to the graphical environment as root. This is frowned upon, but hey, you want to achieve something.

Or log on to the graphical environment as username, open a terminal window and use su to become root. You don't need a text console to run apt-get clean.

Last edited by berndbausch; 04-09-2020 at 02:52 AM.
 
Old 04-09-2020, 03:00 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 20,217

Rep: Reputation: 3458Reputation: 3458Reputation: 3458Reputation: 3458Reputation: 3458Reputation: 3458Reputation: 3458Reputation: 3458Reputation: 3458Reputation: 3458Reputation: 3458
Welcome to linuxquestions.
sudo has not been replaced, it's just not enabled by default.

su allows you to become another user whereas sudo allows you to run commands with another users priviledges usually roots. With sudo you would use your password but su requires the password of the user your switching to.

su without a username defaults to root. The - option also switches to that user's environment.

At first guess your still not logged in as root which is why your seeing the permission errors.

Last edited by michaelk; 04-09-2020 at 03:04 AM.
 
1 members found this post helpful.
Old 04-09-2020, 03:47 AM   #4
Turbocapitalist
Senior Member
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 4,894
Blog Entries: 3

Rep: Reputation: 2441Reputation: 2441Reputation: 2441Reputation: 2441Reputation: 2441Reputation: 2441Reputation: 2441Reputation: 2441Reputation: 2441Reputation: 2441Reputation: 2441
So if you have set the password for the root account during, or after, installation, you can use it to do the updates and such:

Code:
su -l
apt update
apt upgrade
apt autoremove
That will switch you to the root account and from there apt or apt-get will work as expected.

Note that if you are going to be scripting any of that then look at apt-get and the -y option.
 
1 members found this post helpful.
Old 04-09-2020, 11:13 AM   #5
DownSouth
LQ Newbie
 
Registered: Apr 2020
Posts: 3

Original Poster
Rep: Reputation: Disabled
First off, thanks for the prompt responses.

*Turbocap - yes, root password was set during installation - will try your advice
and report back.

*MichaelK - thanks for clarification re 'sudo' - will (hopefully!!) explain more
fully when I report back.

*Berndbau - briefly, I used the Terminal Emulator window.
 
Old 04-09-2020, 11:52 PM   #6
DownSouth
LQ Newbie
 
Registered: Apr 2020
Posts: 3

Original Poster
Rep: Reputation: Disabled
TurboCap, what can I say? Your advice was perfect and worked like a charm!
I don't know - the words 'thank you' frankly seem a tiny bit inadequate, even though
to someone who 'knows stuff' etc. it may seem like nothing but it made a big difference.

Did a 'test-drive' - typed "autoremove" and it wanted to take out about 260 items (= 370MB)
but as some of the items on the list seemed useful, I declined. Made me wonder though if
other people actually look through the listing before typing 'y'?

One last thing, in the menu are UXTerm & XTerm - haven't used them, but I wondered what
the advantages / differences are?

As mentioned originally, everything about this system (now the terminal functions normally)
is satisfying - Deb with an xfce DE so, nice & lean. Thoroughly recommend it.

I'd send you an Easter egg, but... I've er - eaten it. However, I can
tell you it was delicious, and I'm sure you would have enjoyed it. :-)


My gratitude once again - have a peaceful Easter and stay healthy.
(and that goes to everyone else at LinuxQuestions...)

Last edited by DownSouth; 04-09-2020 at 11:56 PM.
 
Old 04-10-2020, 01:45 AM   #7
Turbocapitalist
Senior Member
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 4,894
Blog Entries: 3

Rep: Reputation: 2441Reputation: 2441Reputation: 2441Reputation: 2441Reputation: 2441Reputation: 2441Reputation: 2441Reputation: 2441Reputation: 2441Reputation: 2441Reputation: 2441
Quote:
Originally Posted by DownSouth View Post
...
Made me wonder though if other people actually look through the listing before typing 'y'?
If you go down the rabbit hole of systemd admnistration and dig around in the advanced capabilities, you can hold specific versions, either old, normal, or bleeding edge, or keep certain dependencies in or out, and so on.

I mention the -y option because, using the shell is basically programming and anything you can type you can keep in a script for replay later, either manual replay or automatic, or local or remote.

Quote:
Originally Posted by DownSouth View Post
...
One last thing, in the menu are UXTerm & XTerm - haven't used them, but I wondered what
the advantages / differences are?
[edit: just to be clear, uxterm runs xterm for you, but with better UTF-8 support]

They're both rather minimal, though UXTerm should have better UTF-8 support. You can see if there are any obvious differences by running them side by side and looking at the menus. The manual pages don't show much. Some terminals do get quite fancy but your own scripts can do more.

A good Easter to you too.

Last edited by Turbocapitalist; 04-10-2020 at 02:20 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: 179 Color Schemes For Your Gtk-Based Linux Terminal (Gnome Terminal, Tilix, Xfce Terminal, More) LXer Syndicated Linux News 0 07-28-2019 04:50 AM
Switching back to the Mandrake 9.1 desktop from terminal rdesktop terminal session marc218 Linux - General 6 02-08-2007 02:45 PM
Redirect terminal output to file AND terminal shan Linux - General 3 09-29-2006 08:36 AM
TightVNC Ver terminal Services.. also looking for terminal Services for linux 2782d4 Linux - Security 3 05-20-2004 02:30 AM
Opening a new terminal from Fluxbox menu (or another terminal) hallamigo Linux - Software 1 05-02-2004 03:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 05:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration