[SOLVED] Password in Debian Installation WILL NOT CHANGE.....
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: What ever will load on the machine I happen to be working on....
Posts: 49
Original Poster
Rep:
My continued reading and trying your suggestion are bringing me no closer to either a resolution nor an understanding of what is going on....see below:
Extra privileges can be granted to individual users temporarily, and then taken away without the need for a password change.
In order for a user to run sudo, the user must belong to group=sudo.
This must be the change I need to make.....? (I will guess yes for now)
Once logged in as a user, you can verify whether or not the user belongs to group=sudo using either the id or groups commands. E.g., a user with id=foo should see output from
$ groups
like
foo sudo
If sudo is not present in the output, the user does not belong to that group.
My Effort:
alan@TAPS1:~$ groups
alan cdrom floppy audio dip video plugdev netdev lpadmin scanner bluetooth
alan@TAPS1:~$
alan@TAPS1:~$ sudo adduser alan sudo
[sudo] password for alan: (used alan pw created at install)
alan is not in the sudoers file. This incident will be reported.
alan@TAPS1:~$
A catch 22.....!!!
alan@TAPS1:~$ sudo adduser alan sudo
[sudo] password for alan: (used other pw created at install)
Sorry, try again.
[sudo] password for alan:
Stop trying to use sudo. The easy default Debian way is to only use "su" to log in as root, and then do whatever you need without using "sudo" at all.
If you wish to use sudo, you will first need to add at least one user to the sudoers file with "visudo". But this seems to only be confusing you.
Basically, ignore sudo for now. You are confused because of Ubuntu oriented documentation, and Ubuntu documentation by default uses sudo for everything.
Alternatively, you can first get root (e.g., sudo su -) and then run the same commands without prefix=sudo:
alan@TAPS1:~$ sudo su -
[sudo] password for alan:
alan is not in the sudoers file. This incident will be reported.
alan@TAPS1:~$
Same catch 22.....!!!
Quote:
Originally Posted by michaelk
In addition, Mint which is based on Ubuntu disables root by default so to execute commands as root you use sudo. For other distributions you can use su to login as root (using root's password) or add your regular user to the sudoers file.
Like I said, stop trying to use sudo. You're only confusing yourself with it. Debian does not do things the Ubuntu way. The Ubuntu way is different from how Debian and other *nix operating systems do things.
As I have explained already, by default no one (except root) has any rights to do *anything* with sudo. So just stop trying to it! Use "su" instead of sudo. Period.
There is no catch-22. You do not need sudo rights to do anything at all. Just log in as root, or use "su". DO NOT USE SUDO.
By the looks, you are indeed in a catch-22 world. That's why I suggested few posts back to boot into Live Cd to disable (temporarily, of course) the root password.
Distribution: What ever will load on the machine I happen to be working on....
Posts: 49
Original Poster
Rep:
Quote:
Originally Posted by BW-userx
the thing being is that you when installing Debian should have been asked to give a password for root, and a password for a user. in that order, that is why I stated that if you enterd two passwords then the first is root, or sudo password and the other one is yours (user) therefore when issuing sudo [anything] you have to enter the root password and not the user password.
Me I just eliminte that by using a different way but that is a secret.
point being sudo requires the password you add for the root user and not the "normal" user, if you have actually been asked to enter a root password.
as per Debian wiki wiki page
Code:
At installation time, you are asked whether you want to use the root account or not.
If you want to (the default), you'll be asked to provide a complex password for root. Use a strong one!
If not, no root account is enabled and the password of the first user created will be used for administration tasks.
If you forgot your root password, you first need to reset the password,
then log as root (now accessible without password) and run passwd to set a new password.
How to use root level access as a normal user
Under Gnome : in Gnome Application Menu/Accessories/Root Terminal
From console : read Debian Reference's Login to a shell prompt as root
In a terminal : you can use su (or gksu) to change your identity to root.
However, it's recommended to configure and use sudo (or gksudo) to run a given command.
When you change from a normal user to root, your prompt will change from user@mypc:~$ to root@mypc:/home/user# .
To find out as which user you're operating now, execute the command whoami.
and then tried every thing i could think of with the 2 pw's I have.
alan@TAPS1:~$ whoami
alan
alan@TAPS1:~$ root
bash: root: command not found
alan@TAPS1:~$ su root
Password:
su: Authentication failure
alan@TAPS1:~$ su root
Password:
su: Authentication failure
alan@TAPS1:~$ su root
Password:
su: Authentication failure
alan@TAPS1:~$ root
bash: root: command not found
alan@TAPS1:~$
and since I am re installing the whole damn shebang any way....the pw for root was "time" no quotes
alan was "alan123" no quotes.....
not too terribly difficult to screw up....!!!!!
as this was NEVER INTENDED to be the final installation I do not mind sharing the uber stupidly simple pwds with the world....
Last edited by OHPRG Project Director; 10-04-2016 at 04:27 PM.
Reason: amended answer
and then tried every thing i could think of with the 2 pw's I have.
alan@TAPS1:~$ whoami
alan
alan@TAPS1:~$ root
bash: root: command not found
alan@TAPS1:~$ su root
Password:
su: Authentication failure
alan@TAPS1:~$ su root
Password:
su: Authentication failure
alan@TAPS1:~$ su root
Password:
su: Authentication failure
alan@TAPS1:~$ root
bash: root: command not found
alan@TAPS1:~$
and since I am re installing the whole damn shebang any way....the pw for root was "time" no quotes
alan was "alan123" no quotes.....
not too terribly difficult to screw up....!!!!!
as this was NEVER INTENDED to be the final installation I do not mind sharing the uber stupidly simple pwds with the world....
Normally you'd just use "su", but "su root" with "time" for the password should have worked. (I just tested "su root" on my Debian Jessie system.) Since it didn't work, I suspect you have done something to mess up the password file somehow during your other attempts to do things with a liveCD or something.
log in as root, or user depending on distro.
if user login then you're HAVE to go to su in the terminal period. Unless that distro sets up the first user added to the system as admin account therefore giving that first user root privages via sudo
step one establish network connection then update system, while waiting for that to get done
edit /etc/sudoers using either visudo or nano or what ever text editor you know how to use. if you use visudo better know the commands to edit, save and exit vi.
add your user to the sudo or wheel group dependning on how you want to set it up.
you can either set up the sudo user to have to use a password or NOT have to use a password when issing system admin commands or working on the system side of the OS.
after that it anyones guess on what to do al depending on what that user wants to do with his or her box.
Distribution: What ever will load on the machine I happen to be working on....
Posts: 49
Original Poster
Rep:
Unless that distro sets up the first user added to the system as admin account therefore giving that first user root privages via sudo
Id have to copy/paste the way it is worded in the Debian install but it almost sounds like that.....cant be sure untill my next install attempt....
step one establish network connection then update system, while waiting for that to get done
If i am following your logic this is step two. but sumantics aside network connectivity is already established as I am using a net install....
then update system, while waiting for that to get done
did not update more than what the netinstall provided. however am still not able to login. which is step one or zero depending on semantics....
edit /etc/sudoers using either visudo or nano or what ever text editor you know how to use. if you use visudo better know the commands to edit, save and exit vi.
Dont i need to be root to do this....the rest would follow suit...correct...?
add your user to the sudo or wheel group dependning on how you want to set it up.
you can either set up the sudo user to have to use a password or NOT have to use a password when issing system admin commands or working on the system side of the OS.
after that it anyones guess on what to do al depending on what that user wants to do with his or her box.
enjoy.
Last edited by OHPRG Project Director; 10-04-2016 at 05:40 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.