Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.
Witam
walcze jeszcze z jednym utrudnienie, system lenny. Dostęp do internetu mam przez modem iplusa. Uruchamiam skrypt iplus poprzez:
#pppd call iplus
i startuje internet. Nie moge jednak uruchomic pppd jako zwykly user. Czytałem troche i wg wielu userów należy wykonać :
#chmod u+s /usr/sbin/pppd
albo
#chmod 4755 /usr/sbin/pppd
oraz dodac użytkownika do grupy dip
adduser ania dip
jednak wykonałem to wszysko i nadal problem brak praw do wykonywania pppd na moim kompie dla wspomianego usera.
Offline
Użyj sudo.
Dopisz coś w stylu
_login_ ALL=(ALL) NOPASSWD: /usr/sbin/pppd
do /etc/sudoers i uruchamiaj sudo /usr/sbin/pppd
Ostatnio edytowany przez urug (2008-09-02 22:20:59)
Offline
dzieki pomogło
nie pomyslal bym ze takie proste.
Offline
witam
moj problem powrocil po tym jak zaktualizaowalem system, oraz nie wiem czy moze to miec znaczenie ale wyrzuciłem eterma a zainstalowalem xterma. Nie moge równiez wykonywac reboot, shutdown, poweroff jako zwykly user. wczesniej wszystko dzialalo.
stokrotka:/home/ania# cat /etc/sudoers # /etc/sudoers # This file MUST be edited with the 'visudo' command as root. # See the man page for details on how to write a sudoers file. Defaults env_reset # Host alias specification # User alias specification User_Alias SHUT_USERS=ania # Cmnd alias specification Cmnd_Alias SHUT=/sbin/halt, /sbin/shutdown, /sbin/reboot, /sbin/poweroff # User privilege specification root ALL=(ALL) ALL SHUT_USERS ALL= NOPASSWD: SHUT ania ALL=(ALL) NOPASSWD: /usr/sbin/pppd # Uncomment to allow members of group sudo to not need a password # (Note that later entries override this, so you might need to move # it further down) # %sudo ALL=NOPASSWD: ALL stokrotka:/home/ania#
stokrotka:/home/ania# cat /home/ania/.bash_profile # ~/.bash_profile: executed by bash(1) for login shells. # see /usr/share/doc/bash/examples/startup-files for examples. # the files are located in the bash-doc package. # the default umask is set in /etc/login.defs #umask 022 # include .bashrc if it exists if [ -f ~/.bashrc ]; then . ~/.bashrc fi # set PATH so it includes user's private bin if it exists if [ -d ~/bin ] ; then PATH=~/bin:"${PATH}" fi alias poweroff='sudo /sbin/poweroff' alias halt='sudo /sbin/halt' alias reboot='sudo /sbin/reboot' alias pppd='sudo /usr/sbin/pppd' stokrotka:/home/ania#
Offline
torpeda80 masz gnome i Lenny? Po wczorajszej aktualizacji coś się popsuło. Działa tylko opcja ,,wyloguj''. Następnie z poziomu gdm można zamknąć system.
Najdziwniejsze jest to, że kiedy klikniesz np.: ,,zamknij system'', nic się nie dzieje. Wystarczy się wylogować i system się zamyka.
Offline
Takie polecenia jak /sbin/halt /sbin/reboot powinny działać niezależnie od środowiska.
Chyba że nastąpil taki objaw jak u Trin
Ostatnio edytowany przez ilin (2008-09-07 20:13:53)
Offline
Działają i fluxbox też działa u mnie normalnie. Jest to ewidentna wina gnome (środowiska).
edit:
ilin nad tym samym się zastanawiałem.
Ostatnio edytowany przez fnmirk (2008-09-07 20:24:19)
Offline
Tylko nie wiemy o co dokładnie chodzilo torpeda80 czy o kliknięcie czy o te polecenia.
Wnioskująć z /etc/sudoers i bash_profile to raczej o polecenia w terminalu.
Ja do wyłaczania w /etc/sudoers mam tak
User_Alias USERS=adam Cmnd_Alias SHUTDOWN=/sbin/shutdown USERS ALL=NOPASSWD:SHUTDOWN
Offline
ja mam fluxboxa i gdm i system lenny. Nie dzialaja mi komendy w terminalu tzn reboot, shutdown, halt, pppd.
Wczesniej moglem jako zwykly user uzywac ich a teraz zadna komenda nie dziala dla zwyklego użytkownika. musze sie teraz zawsze zalogowac na roota aby je wykonac.
Offline
Wpisanie w terminalu sudo /sbin/halt nie dziala?
Jesli nie to sprobuj spreparować /etc/sudoers wg mojego wzoru bo u mnie sudo /sbin/shutdown -h now dziala bez problemu.
Ostatnio edytowany przez ilin (2008-09-07 20:52:50)
Offline
Ja będę dzisiaj aktualizował ponownie. Zobaczę czy się to naprawi.
urug, restartowałeś system? Wystąpiło to po restarcie. Wczoraj normalnie zamknąłem z poziomu gnome.
Offline
Naprawiło się po aktualizacji dzisiejszej - częściowo. Działają teraz wszystkie opcje. Tylko odlicza od 60.
Wybierając dowolną opcję informowany jestem o jej zadziałaniu za 60 sekund. I tak działa. Jak nie wybiorę żadnej opcji (tylko mam otwarte okienko), to komputer się wyłączy za 60 sekund.
Wyłączyć teraz komputer?
Nazwa zalogowanego użytkownika: "ja".
Komputer zostanie automatycznie wyłączony za 60 sekund.
Podobnie przy wylogowaniu.
Offline
dzieki za odpowiedzi, zaktualizuje jutro system i sprawdze czy wsjo wpariadkie.
Offline
Po aktualizacji komendy w termnalu dzialaja dla zwyklego usera tylko w tej dlugiej postaci tj np. sudo /sbin/reboot .
potworzylem aliasy ale nie chca dzialac. Probowalem na wiele sposobow ale juz chyba cos namotalem.
moze ktos przeslac ktos swoje bashe?
moj /~/.bash_profile
stokrotka:/home/ania# cat .bash_profile # ~/.bash_profile: executed by bash(1) for login shells. # see /usr/share/doc/bash/examples/startup-files for examples. # the files are located in the bash-doc package. # the default umask is set in /etc/login.defs #umask 022 # include .bashrc if it exists if [ -f ~/.bashrc ]; then . ~/.bashrc fi # set PATH so it includes user's private bin if it exists if [ -d ~/bin ] ; then PATH=~/bin:"${PATH}" fi alias poweroff = 'sudo /sbin/poweroff' alias halt = 'sudo /sbin/halt' alias reboot = 'sudo /sbin/reboot' alias pppd = 'sudo /usr/sbin/pppd' stokrotka:/home/ania#
oraz /~/.bashrc
stokrotka:/home/ania# cat .bash_profile # ~/.bash_profile: executed by bash(1) for login shells. # see /usr/share/doc/bash/examples/startup-files for examples. # the files are located in the bash-doc package. # the default umask is set in /etc/login.defs #umask 022 # include .bashrc if it exists stokrotka:/home/ania# ls -a . .bash_logout .conkyrc .Eterm .gconf .gqview .kde .mozilla .recently-used .Xauthority .. .bash_profile .dbus .fehbg .gconfd .gtk-bookmarks .local .mplayer .recently-used.xbel .xsession-errors .AbiSuite .bashrc Desktop .fehrc .gnome2 .ICEauthority .mc .openoffice.org2 teledyski youtube Ania pendrive .cache .dia .fluxbox .gnome2_private .joe_state .mcop Pismo - B.Tarakan.doc .themes .bash_history .config .dmrc .fontconfig .gnupg .kadu .mcoprc .qt .thumbnails stokrotka:/home/ania# cat .bashrc # ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # for examples # If not running interactively, don't do anything [ -z "$PS1" ] && return # don't put duplicate lines in the history. See bash(1) for more options export HISTCONTROL=ignoredups # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. shopt -s checkwinsize # make less more friendly for non-text input files, see lesspipe(1) [ -x /usr/bin/lesspipe ] && eval "$(lesspipe)" # set variable identifying the chroot you work in (used in the prompt below) if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then debian_chroot=$(cat /etc/debian_chroot) fi # set a fancy prompt (non-color, unless we know we "want" color) case "$TERM" in xterm-color) PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' ;; *) PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' ;; esac stokrotka:/home/ania# cat .bashrc # ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # for examples # If not running interactively, don't do anything [ -z "$PS1" ] && return # don't put duplicate lines in the history. See bash(1) for more options export HISTCONTROL=ignoredups # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. shopt -s checkwinsize # make less more friendly for non-text input files, see lesspipe(1) [ -x /usr/bin/lesspipe ] && eval "$(lesspipe)" # set variable identifying the chroot you work in (used in the prompt below) if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then debian_chroot=$(cat /etc/debian_chroot) fi # set a fancy prompt (non-color, unless we know we "want" color) case "$TERM" in xterm-color) PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' ;; *) PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' ;; esac # Comment in the above and uncomment this below for a color prompt #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' # If this is an xterm set the title to user@host:dir case "$TERM" in xterm*|rxvt*) PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"' ;; *) ;; esac # Alias definitions. # You may want to put all your additions into a separate file like # ~/.bash_aliases, instead of adding them here directly. # See /usr/share/doc/bash-doc/examples in the bash-doc package. #if [ -f ~/.bash_aliases ]; then # . ~/.bash_aliases #fi # enable color support of ls and also add handy aliases if [ "$TERM" != "dumb" ]; then eval "`dircolors -b`" alias ls='ls --color=auto' #alias dir='ls --color=auto --format=vertical' #alias vdir='ls --color=auto --format=long' fi # some more ls aliases #alias ll='ls -l' #alias la='ls -A' #alias l='ls -CF' alias poweroff='/sbin/poweroff' alias reboot='/sbin/reboot' alias halt='/sbin/halt' alias shutdown='/sbin/shutdown' # enable programmable completion features (you don't need to enable # this, if it's already enabled in /etc/bash.bashrc and /etc/profile # sources /etc/bash.bashrc). if [ -f /etc/bash_completion ]; then . /etc/bash_completion fi export LC_ALL=pl_PL.UTF-8 export LANG=pl_PL.UTF-8 export LANGUAGE=pl_PL.UTF-8 stokrotka:/home/ania#
Offline
Przerób pod swój modem (skrypt jest w ostatnim poście): http://www.debian.linux.pl/viewtopic.php?p=55378#55378
Będzie modem i połączenie startować automatycznie z systemem. Może takie rozwiązanie będzie lepsze.
Offline
Nie chcą działać aliasy czort z nimi.
Utworz skrypta w /usr/bin nazwij go halt wklep do niego
#!/bin/bash sudo halt
Nadaj prawa do wykonywania i nie ma sily
Wpisanie w terminalu halt musi zadzialać.
Tak mozesz każde polecenie zrobić.
Offline
alias poweroff = 'sudo /sbin/poweroff' alias halt = 'sudo /sbin/halt' alias reboot = 'sudo /sbin/reboot' alias pppd = 'sudo /usr/sbin/pppd'
Takie aliasy mogą namieszać w systemie. Wyzeruj, usuń je i wykonaj nowe. Wybierając inne nazwy.
Offline