LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 10-04-2016, 03:44 PM   #31
OHPRG Project Director
Member
 
Registered: Sep 2016
Location: Southern California
Distribution: What ever will load on the machine I happen to be working on....
Posts: 49

Original Poster
Rep: Reputation: Disabled

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:

????????????????????????????????????????????
 
Old 10-04-2016, 03:48 PM   #32
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
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.
 
Old 10-04-2016, 03:50 PM   #33
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by OHPRG Project Director View Post
Thank you for the reply let me try to address your questions to me one at a time:



Alan
how to reset root password in Debian two links I hope this helps.

Link 1


Link 2
 
Old 10-04-2016, 03:56 PM   #34
OHPRG Project Director
Member
 
Registered: Sep 2016
Location: Southern California
Distribution: What ever will load on the machine I happen to be working on....
Posts: 49

Original Poster
Rep: Reputation: Disabled
????????????????????????????????????????????

Using the further instructions provided at:
https://wiki.debian.org/sudo

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 View Post
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.

https://help.ubuntu.com/community/RootSudo

https://wiki.debian.org/sudo

https://www.digitalocean.com/communi...n-a-debian-vps
 
Old 10-04-2016, 04:03 PM   #35
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
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.

Last edited by IsaacKuo; 10-04-2016 at 04:04 PM.
 
Old 10-04-2016, 04:03 PM   #36
c0wb0y
Member
 
Registered: Jan 2012
Location: Inside the oven
Distribution: Windows
Posts: 417

Rep: Reputation: 74
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.
 
Old 10-04-2016, 04:18 PM   #37
OHPRG Project Director
Member
 
Registered: Sep 2016
Location: Southern California
Distribution: What ever will load on the machine I happen to be working on....
Posts: 49

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by BW-userx View Post
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.

debian wiki

alan@TAPS1:~$ whoami
alan
alan@TAPS1:~$


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
 
Old 10-04-2016, 04:21 PM   #38
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by OHPRG Project Director View Post
alan@TAPS1:~$ whoami
alan
alan@TAPS1:~$
next step type

su
password:
enter root password

that will give you root (sudo) permissions to do evrything, even wipe out your entire system.
 
Old 10-04-2016, 04:36 PM   #39
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
Quote:
Originally Posted by OHPRG Project Director View Post
alan@TAPS1:~$ whoami
alan
alan@TAPS1:~$


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.
 
Old 10-04-2016, 04:54 PM   #40
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,679

Rep: Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893
FYI su defaults to root if no user name is specified. So the command "su" is the same as "su root".

You can use su to become any other regular user not just root.

The installer typically confirms passwords. Did you enter the wrong one i.e. alan123 instead of time?
 
Old 10-04-2016, 04:57 PM   #41
OHPRG Project Director
Member
 
Registered: Sep 2016
Location: Southern California
Distribution: What ever will load on the machine I happen to be working on....
Posts: 49

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by BW-userx View Post
next step type

su
password:
enter root password

that will give you root (sudo) permissions to do evrything, even wipe out your entire system.
alan@TAPS1:~$ whoami
alan
alan@TAPS1:~$ su
Password:
su: Authentication failure
alan@TAPS1:~$
 
Old 10-04-2016, 05:00 PM   #42
OHPRG Project Director
Member
 
Registered: Sep 2016
Location: Southern California
Distribution: What ever will load on the machine I happen to be working on....
Posts: 49

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by OHPRG Project Director View Post
alan@TAPS1:~$ whoami
alan
alan@TAPS1:~$ su
Password:
su: Authentication failure
alan@TAPS1:~$
Apparently im such a genius i cant even wipe out my own install on my own server...!!!
 
Old 10-04-2016, 05:01 PM   #43
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
POST INSTALL ON EVERY LINUX:

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.

enjoy.

Last edited by BW-userx; 10-04-2016 at 05:03 PM.
 
Old 10-04-2016, 05:05 PM   #44
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,679

Rep: Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893
I might be easier to reset the root password.
http://www.debianadmin.com/how-to-re...-password.html
 
Old 10-04-2016, 05:36 PM   #45
OHPRG Project Director
Member
 
Registered: Sep 2016
Location: Southern California
Distribution: What ever will load on the machine I happen to be working on....
Posts: 49

Original Poster
Rep: Reputation: Disabled
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.
 
  


Reply



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
[SOLVED] Debian Installation - Change Network Card Speed During Installation protocol Linux - Networking 8 03-30-2012 01:17 PM
how to change debian gnu grub 1.97 password root? please help me , redscience Linux - Server 1 01-12-2012 06:34 PM
Change my root password in Debian Linux if I have the current password? panseluta Linux - Newbie 2 12-28-2008 02:02 AM
Debian log (Change Password) daimous Linux - General 2 12-12-2008 02:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:19 AM.

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