You are not logged in.

#1 2012-07-12 12:00:18

blackdeagle
Member
From: Karlsruhe, Germany
Registered: 2008-09-13
Posts: 47

[SOLVED] sudo doesnt work

Hi guys,

I'm having the strangest issues since my last installation of archlinux. First I could not login into any tty (after entering the username, nothing happened). I could solve that by installing the util-linux package. Now I cannot use sudo.
The user is in the group wheel (which is uncommented in sudoers). I have changed nothing in the sudoers file, here's the content:

## sudoers file.
##
## This file MUST be edited with the 'visudo' command as root.
## Failure to use 'visudo' may result in syntax or file permission errors
## that prevent sudo from running.
##
## See the sudoers man page for the details on how to write a sudoers file.
##

##
## Host alias specification
##
## Groups of machines. These may include host names (optionally with wildcards),
## IP addresses, network numbers or netgroups.
# Host_Alias	WEBSERVERS = www1, www2, www3

##
## User alias specification
##
## Groups of users.  These may consist of user names, uids, Unix groups,
## or netgroups.
# User_Alias	ADMINS = millert, dowdy, mikef

##
## Cmnd alias specification
##
## Groups of commands.  Often used to group related commands together.
# Cmnd_Alias	PROCESSES = /usr/bin/nice, /bin/kill, /usr/bin/renice, \
# 			    /usr/bin/pkill, /usr/bin/top

##
## Defaults specification
##
## You may wish to keep some of the following environment variables
## when running commands via sudo.
##
## Locale settings
# Defaults env_keep += "LANG LANGUAGE LINGUAS LC_* _XKB_CHARSET"
##
## Run X applications through sudo; HOME is used to find the
## .Xauthority file.  Note that other programs use HOME to find   
## configuration files and this may lead to privilege escalation!
# Defaults env_keep += "HOME"
##
## X11 resource path settings
# Defaults env_keep += "XAPPLRESDIR XFILESEARCHPATH XUSERFILESEARCHPATH"
##
## Desktop path settings
# Defaults env_keep += "QTDIR KDEDIR"
##
## Allow sudo-run commands to inherit the callers' ConsoleKit session
# Defaults env_keep += "XDG_SESSION_COOKIE"
##
## Uncomment to enable special input methods.  Care should be taken as
## this may allow users to subvert the command being run via sudo.
# Defaults env_keep += "XMODIFIERS GTK_IM_MODULE QT_IM_MODULE QT_IM_SWITCHER"
##
## Uncomment to enable logging of a command's output, except for
## sudoreplay and reboot.  Use sudoreplay to play back logged sessions.
# Defaults log_output
# Defaults!/usr/bin/sudoreplay !log_output
# Defaults!/usr/local/bin/sudoreplay !log_output
# Defaults!/sbin/reboot !log_output

##
## Runas alias specification
##

##
## User privilege specification
##
root ALL=(ALL) ALL

## Uncomment to allow members of group wheel to execute any command
 %wheel ALL=(ALL) ALL

## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL

## Uncomment to allow members of group sudo to execute any command
# %sudo	ALL=(ALL) ALL

## Uncomment to allow any user to run sudo if they know the password
## of the user they are running the command as (root by default).
# Defaults targetpw  # Ask for the password of the target user
# ALL ALL=(ALL) ALL  # WARNING: only use this together with 'Defaults targetpw'

## Read drop-in files from /etc/sudoers.d
## (the '#' here does not indicate a comment)
#includedir /etc/sudoers.d

In the auth.log there are following lines which seem to be important:

Jul 12 13:46:18 localhost sudo: PAM _pam_init_handlers: no default config /etc/pam.d/other
Jul 12 13:46:21 localhost sudo: PAM no modules loaded for `sudo' service
Jul 12 13:46:22 localhost sudo: pam_unix(sudo:auth): conversation failed
Jul 12 13:46:22 localhost sudo: pam_unix(sudo:auth): auth could not identify password for [archUser]
Jul 12 13:46:22 localhost sudo:    archUser: 1 incorrect password attempt ; TTY=pts/2 ; PWD=/home/archUser; USER=root ; COMMAND=/usr/bin/pacman -Syyuu

So I looked up the content of /etc/pam.d/sudo:

root@arch /etc/pam.d # cat sudo
#%PAM-1.0
auth            required        pam_unix.so
auth            required        pam_nologin.so

The files pam_unix.so and pam_nologin.so are both saved in /usr/lib/security.


I noticed that if I enter the password wrong, I need to wait one or two seconds before I can try it again (this behaviour seems to be normal). But when I enter the password correct, there is no waiting time and I can enter the pass again.

I have no idea what to do and hope that anyone can help me to use sudo again.
4 years ago, after installing archlinux the first time, I had not a single error. Everything worked just fine but now I get two errors at once after the installation!

--blackdeagle

Last edited by blackdeagle (2012-07-12 14:05:53)

Offline

#2 2012-07-12 12:18:01

guelfi
Member
From: /home/guelfi
Registered: 2011-07-01
Posts: 111

Re: [SOLVED] sudo doesnt work

blackdeagle wrote:

I could solve that by installing the util-linux package.

Did you forget to include the "base" package group when installing? If so, you should install it.

Offline

#3 2012-07-12 12:20:51

blackdeagle
Member
From: Karlsruhe, Germany
Registered: 2008-09-13
Posts: 47

Re: [SOLVED] sudo doesnt work

I didn't change anything during the package-selection, it was installed with the default settings.
After the installation I did install base and base-devel but the problem wasn't still solved sad

Offline

#4 2012-07-12 12:40:21

illusionist
Member
From: localhost
Registered: 2012-04-03
Posts: 498

Re: [SOLVED] sudo doesnt work

it could be the "pam" issue.
install "pambase" and "pam" again to see it that fixes your problem.
do you have two login files in your /etc/pam.d/ ?


  Never argue with stupid people,They will drag you down to their level and then beat you with experience.--Mark Twain
@github

Offline

#5 2012-07-12 12:45:47

blackdeagle
Member
From: Karlsruhe, Germany
Registered: 2008-09-13
Posts: 47

Re: [SOLVED] sudo doesnt work

illusionist wrote:

it could be the "pam" issue.
install "pambase" and "pam" again to see it that fixes your problem.
do you have two login files in your /etc/pam.d/ ?

I reinstalled pambase and pam (with -Sf) but it didn't help.
I have a file called "login" and another one called "login.pacnew". I just moved login to login.old and login.pacnew to login but this didn't help either. I'm going to reboot the machine..

Edit: Reboot didn't help sad
Edit2: Somehow I can type in su and I am root without entering the password! This isn't normal, is it?

Last edited by blackdeagle (2012-07-12 12:51:48)

Offline

#6 2012-07-12 12:55:54

illusionist
Member
From: localhost
Registered: 2012-04-03
Posts: 498

Re: [SOLVED] sudo doesnt work

can you as root create another user and login as that user ?


  Never argue with stupid people,They will drag you down to their level and then beat you with experience.--Mark Twain
@github

Offline

#7 2012-07-12 12:59:41

blackdeagle
Member
From: Karlsruhe, Germany
Registered: 2008-09-13
Posts: 47

Re: [SOLVED] sudo doesnt work

I logged in as root, created the user temp, added him in visudo, logged in as temp and tried 'sudo pacman -Syyuu' but temp also has the same problem sad

Edit: After I removed temp from the visudoers, there is no error message when trying to execute commands with sudo! Shouldn't there be something like "You aren't in the sudoers, the incident will be reported"?!

Last edited by blackdeagle (2012-07-12 13:01:43)

Offline

#8 2012-07-12 13:34:13

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [SOLVED] sudo doesnt work

blackdeagle wrote:

I reinstalled pambase and pam (with -Sf) but it didn't help.

no, no, NO! never use --force/-f !!! this is probably why you have this problem in the first place. reinstall pambase without --force. And next time use the search function, there have been about 15 threads about this exact issue in the last few weeks.

Offline

#9 2012-07-12 13:52:41

blackdeagle
Member
From: Karlsruhe, Germany
Registered: 2008-09-13
Posts: 47

Re: [SOLVED] sudo doesnt work

65kid wrote:
blackdeagle wrote:

I reinstalled pambase and pam (with -Sf) but it didn't help.

no, no, NO! never use --force/-f !!! this is probably why you have this problem in the first place. reinstall pambase without --force. And next time use the search function, there have been about 15 threads about this exact issue in the last few weeks.

Please stay away from my thread! I don't need people like you telling me to search the forums and which parameters I can use and which not!

Offline

#10 2012-07-12 14:03:43

Pres
Member
Registered: 2011-09-12
Posts: 423

Re: [SOLVED] sudo doesnt work

blackdeagle wrote:
65kid wrote:
blackdeagle wrote:

I reinstalled pambase and pam (with -Sf) but it didn't help.

no, no, NO! never use --force/-f !!! this is probably why you have this problem in the first place. reinstall pambase without --force. And next time use the search function, there have been about 15 threads about this exact issue in the last few weeks.

Please stay away from my thread! I don't need people like you telling me to search the forums and which parameters I can use and which not!

You are not going to get much help that way. Especially since his advice is correct. No need for the --force option there.

Do you have the file /etc/pam.d/other?

Offline

#11 2012-07-12 14:05:18

blackdeagle
Member
From: Karlsruhe, Germany
Registered: 2008-09-13
Posts: 47

Re: [SOLVED] sudo doesnt work

Sooooooooo I got this thing solved:

Reinstalling pambase (also WITHOUT the force-option) didn't help so I looked up which files are installed with this packages. Turns out that the file /etc/pam.d/other was corrupt. I asked a friend to send me his other-file.. Now it works!

Thanks everyone for helping!

Offline

#12 2012-07-12 14:07:14

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [SOLVED] sudo doesnt work

blackdeagle wrote:
65kid wrote:
blackdeagle wrote:

I reinstalled pambase and pam (with -Sf) but it didn't help.

no, no, NO! never use --force/-f !!! this is probably why you have this problem in the first place. reinstall pambase without --force. And next time use the search function, there have been about 15 threads about this exact issue in the last few weeks.

Please stay away from my thread! I don't need people like you telling me to search the forums and which parameters I can use and which not!

seriously? it is stated in multiple news, the wiki and in about every third forum thread that you shouldn't use force unless you know exactly what you are doing or you are explicitly told to use it. I don't blame you that you didn't notice this, a lot of people don't (unfortunately). But when people correct you and want to help you are like "whatever, I do what I want! go away!" ???

And what do you think the search function is for?

Please stay away from Arch... geez...

Offline

#13 2012-07-12 14:08:28

blackdeagle
Member
From: Karlsruhe, Germany
Registered: 2008-09-13
Posts: 47

Re: [SOLVED] sudo doesnt work

65kid wrote:
blackdeagle wrote:
65kid wrote:

no, no, NO! never use --force/-f !!! this is probably why you have this problem in the first place. reinstall pambase without --force. And next time use the search function, there have been about 15 threads about this exact issue in the last few weeks.

Please stay away from my thread! I don't need people like you telling me to search the forums and which parameters I can use and which not!

seriously? it is stated in multiple news, the wiki and in about every third forum thread that you shouldn't use force unless you know exactly what you are doing or you are explicitly told to use it. I don't blame you that you didn't notice this, a lot of people don't (unfortunately). But when people correct you and want to help you are like "whatever, I do what I want! go away!" ???

And what do you think the search function is for?

Please stay away from Arch... geez...

Come on, do you seriously think you are the only one using the search function? Show me some threads with the solution for my issue!

Offline

#14 2012-07-12 14:14:52

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [SOLVED] sudo doesnt work

blackdeagle wrote:
65kid wrote:
blackdeagle wrote:

Please stay away from my thread! I don't need people like you telling me to search the forums and which parameters I can use and which not!

seriously? it is stated in multiple news, the wiki and in about every third forum thread that you shouldn't use force unless you know exactly what you are doing or you are explicitly told to use it. I don't blame you that you didn't notice this, a lot of people don't (unfortunately). But when people correct you and want to help you are like "whatever, I do what I want! go away!" ???

And what do you think the search function is for?

Please stay away from Arch... geez...

Come on, do you seriously think you are the only one using the search function? Show me some threads with the solution for my issue!

https://bbs.archlinux.org/viewtopic.php?id=143335
https://bbs.archlinux.org/viewtopic.php?id=144079
https://bbs.archlinux.org/viewtopic.php?id=143487
https://bbs.archlinux.org/viewtopic.php?id=142729
https://bbs.archlinux.org/viewtopic.php?id=142720
https://bbs.archlinux.org/viewtopic.php?id=142941
https://bbs.archlinux.org/viewtopic.php?id=144599

Offline

#15 2012-07-12 14:21:40

blackdeagle
Member
From: Karlsruhe, Germany
Registered: 2008-09-13
Posts: 47

Re: [SOLVED] sudo doesnt work

1st url: ok this would solve my problem!
2nd url: "reinstalling pambase does the trick" - didn't work for me
3rd url: they also installed pambase, didn't work for me
4th url: you referred there to another url, where they solved the problem with reinstalling pambase
5th url: "reinstall pambase" ...
6th url: you posted the same url again
7th url: the url to google which the administrator posted refers to google search results on which EVERY SINGLE LINK is marked as "clicked" on my computer!

Last edited by blackdeagle (2012-07-12 14:23:32)

Offline

#16 2012-07-12 14:29:25

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [SOLVED] sudo doesnt work

blackdeagle wrote:

1st url: ok this would solve my problem!
2nd url: "reinstalling pambase does the trick" - didn't work for me
3rd url: they also installed pambase, didn't work for me
4th url: you referred there to another url, where they solved the problem with reinstalling pambase
5th url: you posted the same url again
6th url: the url to google which the administrator posted refers to google search results on which EVERY SINGLE LINK is marked as "clicked" on my computer!

and all of that changes my point that you could have searched first how exactly? An "I searched, but reinstalling pambase didn't help" would have been fine...
And reinstalling pambase probably didn't work for you because you screwed up by using force for no apparent reason again and again.
but yeah, sorry, who am I to tell you to not use force...!!

anyway, enough discussion.. otherwise this thread will be closed quickly anyway.. wink

Offline

#17 2012-07-12 14:34:18

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: [SOLVED] sudo doesnt work

Calm down guys. blackdeagle, 65kid was trying to help. No harm was meant of it. There's no need for this very TGN back and forth.
Respect Other Users
Be Responsible

65kid wrote:

anyway, enough discussion.. otherwise this thread will be closed quickly anyway.. wink


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

Board footer

Powered by FluxBB