Irgendetwas in der .bashrc oder .zshrc "optimiert"?
gelöst: Terminal erst nach sudo-PW verwendbar
Hi, soweit ich weiß, gab es gestern eine neue Version von sudo. Vielleicht müsstest Du dort einmal recherchieren, ob es damit in Zusammenhang steht. https://github.com/sudo-project/sudo/issues
- Bearbeitet
Vielen Dank für den Hinweis, werde da noch einmal nachschauen. Aber ich kann mir nicht vorstellen, dass ich dort in dieser Richtung etwas verändert habe. Danke
Liebe Grüße Arya
[EDIT: auch in den *.rc's ist nichts zu finden, was darauf hindeutet, weshalb das sudo-PW verlangt wird.]
- Bearbeitet
AryA also, die Version 1.9.15 ist ja schon eine Weile am Start. Gestern ist lediglich 1.9.15p4 erschienen. Vielleicht schaust Du mal nach den zeitlichen Zusammenhängen. https://www.sudo.ws/releases/stable/#1.9.15p4
- Bearbeitet
Wie sieht es denn z.B. auf tty3 aus?
Und was passiert, wenn man einen neuen Benutzer an den Start schickt?
tuxnix im Moment bin ich Single-User und wenn ich mit <STRG>+<ALT>+<F3> auf tty3 schalte, dann folgt das bekannte schwarze Terminal übern ganzen Schirm mit:
Arch Linux 6.6.7-arch1-1 (tty3)
XXXXXX login: <arya> (<----Eingabe Benutzer)
Password: (<----Eingabe PW)
Last Login Tue Dec 19 21:53:10 on tty4
[sudo] Passwort für arya:
wie du siehst auch hier die Abfrage. Vielen Dank für deine Mühe.
Liebe Grüße Arya
Hallo
Schau mal hier:
https://askubuntu.com/questions/214539/opening-terminal-asks-for-sudo-password
Vielleicht hilft Dir das weiter.
- Bearbeitet
Ich habe da so eine Vermutung... ( bin mir aber nicht so sicher )
wenn der Benutzer sudo-Rechte bekommt , muss das im der folgende Config-datei drin stehen:
/etc/sudoers
D.h. der Benutzer muss in der Gruppe wheel drin sein.
Es kann sein dass du mit dem Befehl
passwd -L root
dem Root-User "sozusagen" die Rechte entzogen hast und damit den normalen User die eingabe des sudo erzwingst....
Aber wie gesagt: Es ist nur eine Vermutung
Nachtrag: Zwei Links dazu zum Lesen:
https://wiki.archlinux.org/title/users_and_groups
https://man.archlinux.org/man/passwd.1.en
SUSEDJAlex wenn der Benutzer sudo-Rechte bekommt , muss das im der folgende Config-datei drin stehen:
/etc/sudoers
D.h. der Benutzer muss in der Gruppe wheel drin sein.
Jein.
SUSEDJAlex Es kann sein dass du mit dem Befehl
passwd -L root
dem Root-User "sozusagen" die Rechte entzogen hast und damit den normalen User die eingabe des sudo erzwingst....
Die Option -L
finde ich nicht. Und passwd
ändert keine Rechte, sondern Passwörter. Aber steht alles in man 1 passwd
. Könnte man natürlich lesen.
@Gerry_Ghetto
Drum habe ich ja auch geschrieben => bin mir nicht sicher....
Vielleicht erstmal von vorne Anfangen.
whoami
dann
id
uid ist?
welche Gruppen werden angezeigt...
Ich schließe mich hier an:
Gerry_Ghetto Irgendetwas in der .bashrc oder .zshrc "optimiert"?
Zeig doch mal die ~/.bashrc und die ~/.bash_profile.
Ansonsten wäre es hilfreich du führst ein
useradd -m -G users,wheel -s /bin/bash <neuer-benutzer>
aus und meldest dich als neuer Benutzer an.
- Bearbeitet
Wenn ich einen neuen User anlege, so existiert das Problem nicht.
Ich nutze zsh. Also hier meine ~/.zshrc:
[ACHTUNG - EDIT: das "->" steht für das Kommentarzeichen nur hier im Ausdruck, da
das reale Kommentarzeichen hier im Forum die Schrift nur überdimensional vergrößert
und nicht angezeigt wird]
--
-> If you come from bash you might have to change your $PATH.
-> export PATH=$HOME/bin:/usr/local/bin:$PATH
-> Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
-> Set name of the theme to load --- if set to "random", it will
-> load a random theme each time oh-my-zsh is loaded, in which case,
-> to know which specific one was loaded, run: echo $RANDOM_THEME
-> See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
->ZSH_THEME="robbyrussell"
ZSH_THEME="jonathan"
-> Set list of themes to pick from when loading at random
-> Setting this variable when ZSH_THEME=random will cause zsh to load
-> a theme from this variable instead of looking in $ZSH/themes/
-> If set to an empty array, this variable will have no effect.
-> ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
-> Uncomment the following line to use case-sensitive completion.
-> CASE_SENSITIVE="true"
-> Uncomment the following line to use hyphen-insensitive completion.
-> Case-sensitive completion must be off. _ and - will be interchangeable.
-> HYPHEN_INSENSITIVE="true"
-> Uncomment the following line to disable bi-weekly auto-update checks.
-> DISABLE_AUTO_UPDATE="true"
-> Uncomment the following line to automatically update without prompting.
-> DISABLE_UPDATE_PROMPT="true"
-> Uncomment the following line to change how often to auto-update (in days).
-> export UPDATE_ZSH_DAYS=13
-> Uncomment the following line if pasting URLs and other text is messed up.
-> DISABLE_MAGIC_FUNCTIONS="true"
-> Uncomment the following line to disable colors in ls.
-> DISABLE_LS_COLORS="true"
-> Uncomment the following line to disable auto-setting terminal title.
-> DISABLE_AUTO_TITLE="true"
->->-> Uncomment the following line to enable command auto-correction.
ENABLE_CORRECTION="true"
-> Uncomment the following line to display red dots whilst waiting for completion.
-> Caution: this setting can cause issues with multiline prompts (zsh 5.7.1 and newer seem to work)
-> See https://github.com/ohmyzsh/ohmyzsh/issues/5765
-> COMPLETION_WAITING_DOTS="true"
-> Uncomment the following line if you want to disable marking untracked files
-> under VCS as dirty. This makes repository status check for large repositories
-> much, much faster.
-> DISABLE_UNTRACKED_FILES_DIRTY="true"
-> Uncomment the following line if you want to change the command execution time
-> stamp shown in the history command output.
-> You can set one of the optional three formats:
-> "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
-> or set a custom format using the strftime function format specifications,
-> see 'man strftime' for details.
-> HIST_STAMPS="mm/dd/yyyy"
-> Would you like to use another custom folder than $ZSH/custom?
-> ZSH_CUSTOM=/path/to/new-custom-folder
-> Which plugins would you like to load?
-> Standard plugins can be found in $ZSH/plugins/
-> Custom plugins may be added to $ZSH_CUSTOM/plugins/
-> Example format: plugins=(rails git textmate ruby lighthouse)
-> Add wisely, as too many plugins slow down shell startup.
plugins=(git)
source $ZSH/oh-my-zsh.sh
-> User configuration
-> export MANPATH="/usr/local/man:$MANPATH"
->->-> You may need to manually set your language environment
export LANG=de_DE.UTF-8
-> Preferred editor for local and remote sessions
-> if [[ -n $SSH_CONNECTION ]]; then
-> export EDITOR='vim'
-> else
-> export EDITOR='mvim'
-> fi
-> Compilation flags
-> export ARCHFLAGS="-arch x86_64"
-> Set personal aliases, overriding those provided by oh-my-zsh libs,
-> plugins, and themes. Aliases can be placed here, though oh-my-zsh
-> users are encouraged to define aliases within the ZSH_CUSTOM folder.
-> For a full list of active aliases, run `alias`.
->
-> Example aliases
-> alias zshconfig="mate ~/.zshrc"
-> alias ohmyzsh="mate ~/.oh-my-zsh"
->list
alias ls='ls --color=auto'
alias la='ls -a'
alias ll='ls -alF'
alias l='ls'
alias l.="ls -A | egrep '^\.'"
->fix obvious typo's
alias update="sudo pacman -Syyu"
alias upboot="sudo pacman -Syyu && shutdown -r 5"
alias updown="sudo pacman -Syyu && shutdown +5"
alias down='shutdown +5'
alias install="sudo pacman -S"
->-> Colorize the grep command output for ease of use (good for log files)->->
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
->readable output
alias df='df -Th'
->pacman unlock
alias unlock="sudo rm /var/lib/pacman/db.lck"
alias rmpacmanlock="sudo rm /var/lib/pacman/db.lck"
->free
alias free="free -mt"
->use all cores
->alias uac="sh ~/.bin/main/000*"
->continue download
alias wget="wget -c"
->userlist
alias userlist="cut -d: -f1 /etc/passwd"
->merge new settings
alias merge="xrdb -merge ~/.Xresources"
-> Aliases for software managment
-> pacman or pm
alias pacman="sudo pacman --color auto"
alias update="sudo pacman -Syyu"
alias clean="pacman -Rsn $(pacman -Qdtq)"
->ps
alias psa="ps auxf"
alias psgrep="ps aux | grep -v grep | grep -i -e VSZ -e"
->back to bash
alias tobash="sudo chsh $USER -s /bin/bash && echo 'Now log out.'"
->hardware info --short
alias hw="hwinfo --short"
->check vulnerabilities microcode
alias microcode='grep . /sys/devices/system/cpu/vulnerabilities/*'
->get fastest mirrors in your neighborhood
alias mirror="sudo reflector -f 30 -l 30 --number 10 --verbose --save /etc/pacman.d/mirrorlist"
alias mirrord="sudo reflector --latest 50 --number 20 --sort delay --save /etc/pacman.d/mirrorlist"
alias mirrors="sudo reflector --latest 50 --number 20 --sort score --save /etc/pacman.d/mirrorlist"
alias mirrora="sudo reflector --latest 50 --number 20 --sort age --save /etc/pacman.d/mirrorlist"
->youtube
alias yta-aac="yt-dlp --extract-audio --audio-format aac "
alias yta-best="yt-dlp --extract-audio --audio-format best "
alias yta-flac="yt-dlp --extract-audio --audio-format flac "
alias yta-m4a="yt-dlp --extract-audio --audio-format m4a "
alias yta-mp3="yt-dlp --extract-audio --audio-format mp3 "
alias yta-opus="yt-dlp --extract-audio --audio-format opus "
alias yta-vorbis="yt-dlp --extract-audio --audio-format vorbis "
alias yta-wav="yt-dlp --extract-audio --audio-format wav "
alias ytv-best="yt-dlp -f bestvideo+bestaudio "
->Recent Installed Packages
alias rip="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -200 | nl"
alias riplong="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -3000 | nl"
->iso and version used to install ArcoLinux
alias iso="cat /etc/dev-rel | awk -F '=' '/ISO/ {print $2}'"
->get the error messages from journalctl
alias jctl="journalctl -p 3 -xb"
->nano for important configuration files
->know what you do in these files
alias nlightdm="sudo nano /etc/lightdm/lightdm.conf"
alias npacman="sudo nano /etc/pacman.conf"
alias nmkinitcpio="sudo nano /etc/mkinitcpio.conf"
alias nslim="sudo nano /etc/slim.conf"
-> alias noblogout="sudo nano /etc/oblogout.conf"
alias nmirrorlist="sudo nano /etc/pacman.d/mirrorlist"
->->Ausgabe von Fehlermeldungen beim Start
alias err="sudo dmesg -T -l err"
->->Dolphin als root
-> alias doroot="pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY KDE_SESSION_VERSION=5 KDE_FULL_SESSION=true dolphin"
->->gpg
->->verify signature for isos
->alias gpg-check="gpg2 --keyserver-options auto-key-retrieve --verify"
->->receive the key of a developer
->alias gpg-retrieve="gpg2 --keyserver-options auto-key-retrieve --receive-keys"
alias key="pacman -Sy archlinux-keyring"
->systeminfo
alias probe="sudo -E hw-probe -all -upload"
->shutdown or reboot or 90
alias ssn="sudo shutdown now"
alias sr="sudo reboot"
alias sh60="shutdown +60"
alias sh90="shutdown +90"
alias sh100="shutdown +100"
alias sh120="shutdown +120"
->Playlist einer CD
alias inhalt="ls > _play.m3u"
neofetch | lolcat
->-> source /home/arya/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
Moderativer Edit: Großere Codebereiche bitte in Codeblöcken posten. Ich habs mal angepasst.
Gruppe 1000 autologin sieht komisch aus. Welchen Installer hast du denn verwendet, um Arch zu installieren?
- Bearbeitet
Installer? Hey Arch habe ich Old School mäßig übers Terminal mit Hilfe des Installation Guides (https://wiki.archlinux.org/title/Installation_guide) im Juli 2021 installiert.
"Installer benutzen nur ubuntu- und linuxmintuser" ^^