LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Difficulty with password in Debian (https://www.linuxquestions.org/questions/linux-software-2/difficulty-with-password-in-debian-4175606279/)

Yuhan 05-19-2017 08:47 AM

Difficulty with password in Debian
 
Hi! I just got a new computer and it has Debian 8 installed. A friend helped me set up the system but I'm having trouble at log in getting the computer to recognize my password. I know I have the correct one (and the computer confirms that) but it says "the line is busy, try again later"! Nothing seems to work here. Any help would be greatly appreciated. This is my first time using Debian; I've used Xubuntu until now. I'm now working in "root" so I don't want to linger here too long. Any help will be appreciated greatly!

Yuhan 05-19-2017 09:14 AM

When I try visudo from the root terminal I get this:visudo: /etc/sudoers busy, try again later. That is the problem. I want to get out of root as I know it's not good to linger here. But I can't gain access from my user name and password.

michaelk 05-19-2017 09:43 AM

You need to provide the exact commands you are trying to run. If you are using sudo i.e. sudo visudo then since you are already root it is not required.

Quote:

But I can't gain access from my user name and password.
Need details but I would assume that you are trying to run commands from your regular user by using sudo and it is not in the sudoers file. debian does not configure sudo by default for regular users. If that is what you are used to you can enable it but there is nothing wrong with using su. Many arguments about which is better.

https://www.howtogeek.com/111479/htg...etween-sudo-su

Yuhan 05-19-2017 09:57 AM

Thank you for that. But the problem is more basic: when I first try to log in (where you have "name" and "password" the system doesn't recognize my password. That is why I am currently operating from root. (But, yes, I am accustomed to using sudo as in "sudo apt-get..." etc.)

snowday 05-19-2017 10:30 AM

While you are logged in as root, you can reset the password for your user. Assuming your username is "yuhan" the command looks like this:

Code:

passwd yuhan
Another thing to check is that you have selected the correct language on the login screen. Sometimes people think they are typing the correct password, but because the wrong language is selected, the keys aren't mapping to the correct symbols. An easy way to check this is to type your password in the Username field, so you can visually verify that you are typing it correctly (but make sure nobody is watching over your shoulder).

ondoho 05-19-2017 11:20 AM

Quote:

Originally Posted by Yuhan (Post 5712751)
I'm having trouble at log in getting the computer to recognize my password. I know I have the correct one (and the computer confirms that)

isn't there a contradiction?

Quote:

"the line is busy, try again later"!
fwiw, i have never, ever seen a message like that on a linux machine, in no context whatsoever.

Yuhan 05-19-2017 03:30 PM

Sorry about that...it wasn't an exact quotation. What I received when typing in "visudo" was the following: visudo: '/etc/sudoers busy, try again later.' But sudoers can't be "busy" because I'm the only one on this network.

The reason I say I know the password is there is because I have tried to change it, using the same password, and the computer acknowledges it is already the present password.

But back to my original point...How do I check out of root and still have the ability to get online when my ordinary user password isn't recognized? My user name isn't the problem, just getting the password to work. Thanks for your feedback!

michaelk 05-19-2017 04:31 PM

Are you typing
sudo visudo
or just
visudo

In the man page under diagnostics it states "Someone else is currently editing the sudoers file." Have you check to see if this is true?

Lets start from scratch... When the computer starts and the login window is displayed I assume you see your username but the password is not accepted? Normally, root login via the GUI is not enabled. Did your friend enable GUI root login or are you using the command line?

Yuhan 05-19-2017 05:54 PM

No, I logged in as root so that I could get online. So in a terminal, already registered as root, I simply put in 'visudo.' No one could possibly be editing the sudoers file--this is a private computer. How else could someone other than me be editing it? And, yes, I used the command line to get on as root.

So let's say I log out as root and return to the main sign-in window which, as you say, has username and password. When I attempt to sign in and the password is then rejected...what should I do? Would you like me to attempt that? Thanks!

snowday 05-19-2017 08:23 PM

A few more troubleshooting ideas you can try:

1. Reboot the computer. If another process has a "lock" on the sudoers file, then rebooting might reset the lock.

2. Switch to a "virtual console" by pressing Ctrl + Alt + one of the Fn keys. This should switch you out of graphical mode into a plain text login. Can you log in as your user in a virtual console?

https://wiki.debian.org/Console#How_...ss_the_Console

3. Create a new user (one way is to use the "adduser" terminal command). Can you log in as the new user?

https://wiki.debian.org/UserAccounts

Yuhan 05-19-2017 08:31 PM

Does this make any sense? I went to a terminal in root and added
the word 'visudo.' I received this message:

# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:$

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification

^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text^T To Spell


Does this provide any information about what the problem is? Thank you!

michaelk 05-19-2017 08:47 PM

Not really since I am still not sure what you were doing before. You have been stating that you already went to a terminal as root.

What you see is that visudo opened the sudoers file using the default text editor pico.

Hungry ghost 05-19-2017 08:47 PM

That seems to be the default sudoers file without any modification. In any case, did you try to change your user's password as instructed in post #5?

Yuhan 05-19-2017 09:05 PM

Changed password as suggested and no difference at all. It came back "Incorrect Password." I'm not clear about what is being suggested in the previous post...

Yuhan 05-19-2017 09:14 PM

I tried the virtual console. Same thing...came back 'Incorrect login."

redfox2807 05-20-2017 01:18 AM

Separate the 2 problems. First solve the problem with user login, then you can work on the sudo problem.

From a root terminal try to enter
Code:

su username
Of course,replace username with your user name. Does it work? If not, post the error it returns alone with the contents of /var/log/auth.log file
Code:

cat /var/log/auth.log

ondoho 05-20-2017 02:17 AM

tl;dr
sorry.

but:
Quote:

Originally Posted by Yuhan (Post 5712937)
No, I logged in as root so that I could get online.

that sentence in itself is so wrong! example

all in all, i'm getting the distinct impression that your system is broken in several ways, and
  1. a good linux tutorial for newbs
  2. a reinstall
might be the best course of action.

Yuhan 05-20-2017 10:42 AM

Ondoho--I'm doing my best to solve a problem here. I'm appreciative of the help I have received. I'm not a techie but I'm doing my best. The problem is simply to get into my system using my non-root password. That's all I set out to solve. If I've not used the correct nomenclature in describing the situation, I'm sorry for that.

ondoho 05-20-2017 11:37 AM

it's not about nomenclature, it's about "being root to get online". while the creation of a connection requires superuser privileges, you should never be root when you're using the internet. too dangerous.

UbuntuconLeche 05-20-2017 11:46 AM

Maybe you could post
Code:

cat /etc/apt/sources.list
If your system really is broken it could be because there are repositories added that are not supposed to be there.

Yuhan 05-20-2017 01:29 PM

Here is reply from 'su username'

root@yama:~# su yuhan
yuhan@yama:/root$

michaelk 05-20-2017 01:37 PM

If you run the su command again i.e.
yuhan@yama:/root$ su yuhan

You should be prompted for yuhan's password. If you enter the password is it accepted. Passwords entered at the prompt are not echoed so you are typing in the blind.

Yuhan 05-20-2017 01:50 PM

Sorry...that was a screw up!

michaelk 05-20-2017 01:53 PM

You did not follow my instructions or posted the wrong information.
Code:

root@yama:~# su yuhan
yuhan@yama:/root$ su yuhan

Were you prompted for a password?

Yuhan 05-20-2017 01:55 PM

Got this:

Password:
su: Authentication failure

michaelk 05-20-2017 02:01 PM

Ok, what happens when you try to change the password.
Quote:

root@yama:~# passwd yuhan

redfox2807 05-20-2017 02:04 PM

Quote:

Originally Posted by Yuhan (Post 5713166)
Here is reply from 'su username'

root@yama:~# su yuhan
yuhan@yama:/root$

So you could login as yuhan successfully. Then the issue is in the password itself it seems. From a root terminal try to set a simple password containing only digits using
Code:

passwd yuhan
Something like 123. Don't use numpad. Then try to login as yuhan again. Again, if you fail to login then post the contents of /var/log/auth.log

Hungry ghost 05-20-2017 04:23 PM

Quote:

Originally Posted by Yuhan (Post 5713181)
Got this:

Password:
su: Authentication failure

This is weird. I'm thinking about two possibilities: maybe your system is set up in such a way that each user (root and your regular user) uses a different locale, hence the keys you input are different for each user, even if the keys you're pressing on the keyboard are the same. After logging in on the CLI as your regular user (by executing su yuhan), try to write your user password as if it was any command (no need to press 'enter') to see if the keys you input match what is displayed on the screen.

The other possibility is, your user might have some privileges disabled, or there might be some permissions issue with some files.

Yuhan 05-20-2017 09:28 PM

Yes, weird...that's the word for it! I tried typing in my password as you suggested and, yes, the keys that I input matched what was on the screen. No problem there at all. As far as privileges disabled, I've no idea what can be done about that. What does the command ALL=(ALL)ALL mean? Does it have any bearing at all on this situation? On a post from another forum (Ubuntu) someone was describing a similar problem and a respondant suggested typing this in a terminal.

Yuhan 05-25-2017 06:28 PM

Well, this is embarrassing...and a little humbling. The solution to this problem was much simpler than I ever imagined. I figured it out entirely by accident! The problem was that I using an uppercase "Y" in my username and it was in fact a lowercase "y"! Once I had that right--voila! I had no problem. Terribly sorry for all the inconvenience. It's easy to forget that Linux is case sensitive. Thank you one and all for your help. Just sorry this proved to be such a dumb solution! My bad. Thanks again.


All times are GMT -5. The time now is 06:10 PM.