su works, but not sudo install...

Here you can discuss every aspect of Debian. Note: not for support requests!

su works, but not sudo install...

Postby xastunts » 2017-10-15 10:15

hello everyone! first of all my apoligies if this topic already have been handled ,or if i also have posted it in the wrong group.
i try to make it short! i can use the su command to allow myself to become root user. now when im at the terminal and as my regular user i do type : sudo apt-get install synaptic
it ask for my root password and it wont aceppt it. i get the error sorry try again. how ever it does seem to aceppt the command su and then makes me a root user. but why on earth wont it aceppt the password when using the sudo command? i'd be thankful for any advice or critic i can get from you guys :) . btw im on debian stretch kde . cheers!
xastunts
 
Posts: 5
Joined: 2017-10-15 09:57

Re: su works, but not sudo install...

Postby L_V » 2017-10-15 10:39

xastunts wrote:it ask for my root password

Are you sure ?
Try with your user password.
+ what report this:
Code: Select all
id
L_V
 
Posts: 717
Joined: 2007-03-19 09:04

Re: su works, but not sudo install...

Postby imazighen-thamzgha » 2017-10-15 11:12

In order to use sudo you have to type your user password, not the root password, that's the difference in security.
Code: Select all
sudo synaptics
// type your password

and you're done.
ⵉⵎⴰⵣⵉⵖⴻⵏ / imaZighen
imazighen-thamzgha
 
Posts: 38
Joined: 2017-04-21 09:38

Re: su works, but not sudo install...

Postby xastunts » 2017-10-15 11:18

the lord of light has told me a lesson!! YES!! i used my user password and not my root password this time and it worked. one more thing about this now. should i change my sudo password to something else then my user password if not using the root as my sudo password? is there any advantages or disadvantages in doing so? thousands of thanks for your help guys! much appriciated.
xastunts
 
Posts: 5
Joined: 2017-10-15 09:57

Re: su works, but not sudo install...

Postby L_V » 2017-10-15 11:39

Let's think two minutes...
Can you imagine a system administrator giving his own password to ALL users ??????
I hope not.
root and user password should be different, to force you think about what you do.
L_V
 
Posts: 717
Joined: 2007-03-19 09:04

Re: su works, but not sudo install...

Postby imazighen-thamzgha » 2017-10-15 12:09

You can't change your sudo password, since it doesn't exist, your sudo password is the same as your user password.
And you should not use the root account for security reasons, that's why sudo exists.
ⵉⵎⴰⵣⵉⵖⴻⵏ / imaZighen
imazighen-thamzgha
 
Posts: 38
Joined: 2017-04-21 09:38

Re: su works, but not sudo install...

Postby L_V » 2017-10-15 12:31

What ?
I have a different root and user password, ... because I have a "real" root account created during installation.
If not, it's a kind of "ubuntu" mode / may be your & xastunts configurations. Don't know.
L_V
 
Posts: 717
Joined: 2007-03-19 09:04

Re: su works, but not sudo install...

Postby imazighen-thamzgha » 2017-10-15 13:02

You don't have to worry about the root user, just give it a good password and forget about it, all you will use is your user account, with sudo.
ⵉⵎⴰⵣⵉⵖⴻⵏ / imaZighen
imazighen-thamzgha
 
Posts: 38
Joined: 2017-04-21 09:38

Re: su works, but not sudo install...

Postby L_V » 2017-10-15 13:17

@imazighen-thamzgha
When you boot Debian in single mode (kernel option), the root password will be requested for system administration.
Which one do you give ? Your user password ? If there are 5 users who are sudoers, how it works ???
I think it is much more confusing without root account.

I don't remember how it works in Ubuntu which is a bit specific, and I always have had a root account created during netinstall in so called "expert" mode.
L_V
 
Posts: 717
Joined: 2007-03-19 09:04

Re: su works, but not sudo install...

Postby imazighen-thamzgha » 2017-10-15 14:19

You just get prompted for the username and password, and you just have to type your username and password, plain and simple.
ⵉⵎⴰⵣⵉⵖⴻⵏ / imaZighen
imazighen-thamzgha
 
Posts: 38
Joined: 2017-04-21 09:38

Re: su works, but not sudo install...

Postby L_V » 2017-10-15 14:24

imazighen-thamzgha wrote:You just get prompted for the username and password.

For a boot in single mode, then for pure system administration, The "username" means nothing if there are 10 users, especially if "sudo" is not loaded.
Last edited by L_V on 2017-10-15 14:58, edited 1 time in total.
L_V
 
Posts: 717
Joined: 2007-03-19 09:04

Re: su works, but not sudo install...

Postby imazighen-thamzgha » 2017-10-15 14:56

how in the?? you're confusing me, what is your problem right now?
ⵉⵎⴰⵣⵉⵖⴻⵏ / imaZighen
imazighen-thamzgha
 
Posts: 38
Joined: 2017-04-21 09:38

Re: su works, but not sudo install...

Postby Head_on_a_Stick » 2017-10-15 15:04

L_V wrote:For a boot in single mode, then for pure system administration

In BunsenLabs we have the root account locked as standard and I would always advise users to boot with the init=/bin/bash kernel parameter for a passwordless root shell, although rescue from our "live" image is almost always preferable because graphical browser.

But imazighen-thamzgha is right, this is off topic.
"Sheer [program] size is often an illusion, reflecting only a need for improvement." — Kernighan and Plauger
User avatar
Head_on_a_Stick
 
Posts: 6815
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: su works, but not sudo install...

Postby L_V » 2017-10-15 15:04

imazighen-thamzgha wrote:how in the?? you're confusing me, what is your problem right now?

I don't have any with a root account. The confusion is when you do not have a root account.
First post is from xastunts which has had a problem.
I just explained to xastunts that the password requested by sudo is not the root one, but the user one, assuming the user is a sudoers, which can be checked by the user himself.
Code: Select all
id
L_V
 
Posts: 717
Joined: 2007-03-19 09:04

Re: su works, but not sudo install...

Postby imazighen-thamzgha » 2017-10-15 15:42

Am sorry mate I have this problem with focusing, I actually thought you were the OP, sorry, peace.
ⵉⵎⴰⵣⵉⵖⴻⵏ / imaZighen
imazighen-thamzgha
 
Posts: 38
Joined: 2017-04-21 09:38

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable