You are not logged in.
Pages: 1
Topic closed
Hello , again !
usually i run root commands with sudo , and i enter my current user password and everything works !
Today , i updated my Arch linux with :
pacman -Syu
and my arch upgraded to 3.4.2-2.
but when i want to run a command with sudo , i cannot use my current user password ?
thankyou
Last edited by arashroshan (2012-06-19 11:10:52)
Offline
Did you read the Sudo wiki page?
Warning: It is imperative that sudoers be free of syntax errors! Any error makes sudo unusable. Always edit it with visudo to prevent errors.
You should place this at the very top:
Defaults editor=/usr/bin/nano
(by running "sudo EDITOR=nano visudo")
Then, each time you want to edit it, just run:
$ sudo visudo
After reading the wiki article, if you still have problems, post your /etc/sudoers file.
I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).
Offline
Try accessing root using "su" and then go into /etc/sudoers and place your username on the computer into the sudoers which is usually under:
example ALL=(ALL) ALL
or
example ALL=(ALL) NOPASSWD: ALL
Our enemies are your enemies, Nick. Disorder, war. It's just a matter of time before a dirty bomb goes off in Moscow, or an EMP fries Chicago. --- Alexander Pierce, Captain America: Winter Soldier
Access Denied! De-cryption failed, override denied all files sealed! --- Triskelion, Shield OS
-----
How to ask questions the smart way
Offline
thank you for reply but i have read sudo wiki and also sudo was working before updating .
by the way su is still working .
here is my sudoer file :
## 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
#arashr ALL=(ALL) 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
Last edited by arashroshan (2012-06-17 10:02:55)
Offline
The Reason why you can't use sudo is because of this #arashr ALL=(ALL) All it should be this arashr ALL=(ALL) NOPASSWD: ALL without the # .
Our enemies are your enemies, Nick. Disorder, war. It's just a matter of time before a dirty bomb goes off in Moscow, or an EMP fries Chicago. --- Alexander Pierce, Captain America: Winter Soldier
Access Denied! De-cryption failed, override denied all files sealed! --- Triskelion, Shield OS
-----
How to ask questions the smart way
Offline
Use [ code ] tags, ffs.
And remove those comments. They're pretty much useless.
Here's mine:
Defaults editor=/usr/bin/nano
root ALL=(ALL) ALL
dspider ALL=(ALL) ALL
dspider ALL=NOPASSWD: /bin/mount, /bin/umount
dspider arch=NOPASSWD: /sbin/reboot, /sbin/poweroff
Moderator: DSpider, please! "ffs" really is inappropriate.
And it does violate our Forum Etiquette: Do Not Flame.
-- bernarcher
Last edited by bernarcher (2012-06-17 13:14:12)
I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).
Offline
If you do a
cat /etc/group |grep `id -un`
and examine if your username is member of the "wheel" group
Offline
Hmmm... How is that different from plain old
$ groups
?
I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).
Offline
Offline
Tells you a bit more about the status like passwd enabled and both root and yourself are member of wheel
Offline
Thank you ! i reinstalled pambase with following command :
pacman -S pambase
and it solved my problem .
Offline
I just wanted to mention that I just experienced the same exact problem as arash on my own systems after the update and the solution was indeed to reinstall 'pambase'. Once I did that, everything was just fine.
Offline
Same problem; same solution. I think this should be mentionned on the news page or somewhere; as it took me several minutes to find.
Offline
Same problem; same solution. I think this should be mentionned on the news page or somewhere; as it took me several minutes to find.
We did put it in the news, but you ignored it and forced the whole upgrade instead of just a single package. We're not in the business of making news items out of stupid user behavior.
Last edited by falconindy (2012-06-28 01:28:38)
Offline
mmmm this works for me....
pacman -S pambase
Same problem; same solution. I think this should be mentionned on the news page or somewhere; as it took me several minutes to find.
thanks...
Offline
Hi folks,
Well, I must be missing something. I think I've tried everything listed here and in the referenced links, but I still have the problem of my system rejecting my password for some uses of sudo and kdesu but not others. I've included my /etc/sudoers file below.
My problem may be associated with screwing around with users: I started out using bruce (1000), then switched to bbraley (1001), then deleted bruce in kusers, then changed bbraley to 1000. When that created more problems without solving the original one, I switched back to 1001. I've played with adding and removing my user from groups, including creating a sudo group, making sure I am a member of wheel group, etc. What seemed to be everyone's magic fix,
pacman -S pambase
didn't work when I tried it successfully with my bbraley password, then later, when that began failing, using the root password. pambase reinstalls, but there is no resulting change in the behavior of sudo.
Side question: Most of my experience is with kubuntu in which I never created a root user and never had any trouble having my user password work with sudo or kdesu. Is there a reason Archwiki beginners guide suggests assigning a separate root account and password?
Can anyone help?
Here's the output of
groups
root adm disk wheel log locate network video audio optical storage scanner power users nm-openconnect systemd-network bbraley sudo sddm
Here's the output of
cat /etc/group |grep `id -un`
root:x:0:bbraley
adm:x:4:root,daemon,bbraley
disk:x:6:root,bbraley
wheel:x:10:root,bbraley
log:x:19:root,bbraley
locate:x:21:bbraley
network:x:90:bbraley
video:x:91:bbraley
audio:x:92:bbraley
optical:x:93:bbraley
storage:x:95:bbraley
scanner:x:96:bbraley
power:x:98:bbraley
users:x:100:bbraley
systemd-network:x:193:bbraley
nm-openconnect:x:104:bbraley
sddm:x:619:bbraley
bbraley:x:500:
sudo:*:501:bbraley
Here's what
ls -l /etc/sudoer
yields:
-r--r----- 1 root root 2948 Mar 22 07:25 /etc/sudoers
And here's my sudoers file:
## 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!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
bbraley 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
Offline
Bruce1956,
Please open a new thread. Much has changed in the last three years. Also, as this thread had been marked closed, you may not see much in the way of response. Feel free to link back to this thread if you believe it is relevant. Closing.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
Pages: 1
Topic closed