Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
nowy uzytkownik, zmiana praw dla /home
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish)
View previous topic :: View next topic  
Author Message
akub
Tux's lil' helper
Tux's lil' helper


Joined: 03 Aug 2004
Posts: 123
Location: Poland, Olkusz/Gliwice

PostPosted: Tue Oct 18, 2005 8:56 am    Post subject: nowy uzytkownik, zmiana praw dla /home Reply with quote

Witam

jako ze nie musialem miec wiecej uzytkownikow niz 1 na moim kompie wiec nie wiem kiedy i po czym to sie stalo

wczoraj chcialem zalogowac sie na konto gosca i podczas logowania wystapil blad

Code:

jakub@akub ~ $ su gosc
Password:
bash: /home/gosc/.bashrc: Brak dostępu
gosc@akub /home/jakub $


zobaczylem prawa dla /home/gosc i faktycznie wlascicielem jest uzytkownik jakub (moje glowne konto), wiec zmienilem na gosc, wszystko pieknie, mozna sie zalogowac, tyle ze chce sie zalogowac pozniej na jakub i pojawia sie ten sam blad

Code:

jakub@akub ~ $ su jakub
Password:
bash: /home/jakub/.bashrc: Brak dostępu
jakub@akub / $


tylko ze teraz wlascicielem /home/jakub jest uzytkownik gosc, i tak w kolko, wlascicielem wszystkich katalogow w /home jest jeden user i nie moge tego zmienic, probowalem reemerge udev, bo tylko to znalazlem w wyszukiwarce, ale nic nie pomoglo

pomocy

pozdrawiam, jakub
_________________
http://gps-y.pl/
http://goralevent.pl/
Back to top
View user's profile Send private message
BeteNoire
Veteran
Veteran


Joined: 25 Sep 2005
Posts: 1827

PostPosted: Tue Oct 18, 2005 9:20 am    Post subject: Re: nowy uzytkownik, zmiana praw dla /home Reply with quote

akub wrote:
jako ze nie musialem miec wiecej uzytkownikow niz 1 na moim kompie

Po co więc Ci 2 konta: gosc i jakub?
Usuń "goscia", zrób chown domowego na jakuba i powinno byc ok.
A jesli nie to usun obu (ale bez ich home !) a potem utwórz nowego swojego ze wskazaniem na przejecie praw do właściwego home.
Back to top
View user's profile Send private message
akub
Tux's lil' helper
Tux's lil' helper


Joined: 03 Aug 2004
Posts: 123
Location: Poland, Olkusz/Gliwice

PostPosted: Tue Oct 18, 2005 9:27 am    Post subject: Reply with quote

no niebardzo, bo teraz potrzebuje 2 konta bo jedno jest moje, a drugie kolegi, a tak pozaty mto cie nie zabardzo zrozumialem, usuniecie konta nic nie daje, ani utworzenie na nowo tez nic nie daje

pozdrawiam, jakub
_________________
http://gps-y.pl/
http://goralevent.pl/
Back to top
View user's profile Send private message
BeteNoire
Veteran
Veteran


Joined: 25 Sep 2005
Posts: 1827

PostPosted: Tue Oct 18, 2005 9:45 am    Post subject: Reply with quote

Coś namieszałeś z prawami. Powinno być:
Code:
chown -R gosc:users /home/gosc
chown -R jakub:users /home/jakub
Back to top
View user's profile Send private message
Zwierzak
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1012
Location: /dev/null

PostPosted: Tue Oct 18, 2005 1:33 pm    Post subject: Reply with quote

A pliki .bashrc nie są przypadkiem symlinkami?
Back to top
View user's profile Send private message
BeteNoire
Veteran
Veteran


Joined: 25 Sep 2005
Posts: 1827

PostPosted: Tue Oct 18, 2005 1:52 pm    Post subject: Reply with quote

Nie powinny być bo bashrc siedzi w /etc/skel i jest kopiowany do katalogu domowego nowo tworzonego użytkownika.
Back to top
View user's profile Send private message
akub
Tux's lil' helper
Tux's lil' helper


Joined: 03 Aug 2004
Posts: 123
Location: Poland, Olkusz/Gliwice

PostPosted: Tue Oct 18, 2005 7:16 pm    Post subject: Reply with quote

.bashrc nie jest symlinkiemn, chown juz probowalem

pozdrawiam, jakub
_________________
http://gps-y.pl/
http://goralevent.pl/
Back to top
View user's profile Send private message
Zwierzak
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1012
Location: /dev/null

PostPosted: Wed Oct 19, 2005 5:30 am    Post subject: Reply with quote

To nadaj temu pliku takie prawo aby obaj użytkownicy mogli go odczytywać i zapisywać bez problemu. Pozatym ten problem jest troche dziwny :/
Back to top
View user's profile Send private message
Callem
n00b
n00b


Joined: 20 May 2004
Posts: 64

PostPosted: Wed Oct 19, 2005 7:17 am    Post subject: Reply with quote

A czy przypadkiem nie masz tych kont przypisanych do tego samego katalogu ?
Code:
cat /etc/passwd |grep home
Back to top
View user's profile Send private message
akub
Tux's lil' helper
Tux's lil' helper


Joined: 03 Aug 2004
Posts: 123
Location: Poland, Olkusz/Gliwice

PostPosted: Wed Oct 19, 2005 8:42 am    Post subject: Reply with quote

wiem ze problem jest dziwny i to bardzo

prawa do pliku .bashrc sa takie jak powinny byc, zmieniaja sie prawa tylko glownego katalogu w home czyli np /home/gosc wszystkie pliki i katalogi, ktore w nim sa maja juz dobre prawa

z katalogami jest wszystko ok
Code:

jakub:x:1000:100::/home/jakub:/bin/bash
bartek:x:1001:100::/home/bartek:/bin/bash
gosc:x:1002:100::/home/gosc:/bin/bash


pozdrawiam, jakub
_________________
http://gps-y.pl/
http://goralevent.pl/
Back to top
View user's profile Send private message
argasek
Bodhisattva
Bodhisattva


Joined: 06 May 2004
Posts: 1121
Location: Sol [0,0], Poland, Kraków

PostPosted: Wed Oct 19, 2005 11:43 am    Post subject: Reply with quote

akub wrote:
.bashrc nie jest symlinkiemn, chown juz probowalem

pozdrawiam, jakub


Wiem że to zabrzmi jak spiskowa teoria dziejów ;), ale skoro nie symlinkiem to może jest hardlinkiem?

Czy plik /etc/suauth istnieje, jeśli tak, co w środku?

Czy korzystasz z gentoo-hardened, selinux, grsecurity lub podobnych?
_________________
RLU #137109 | http://soundcloud.com/argasek
Back to top
View user's profile Send private message
akub
Tux's lil' helper
Tux's lil' helper


Joined: 03 Aug 2004
Posts: 123
Location: Poland, Olkusz/Gliwice

PostPosted: Wed Oct 19, 2005 11:56 am    Post subject: Reply with quote

.bashrc jest to naormalny plik zaden symlink

/etc/suauth nie istnieje

uzywam nitro-sources

pozdrawiam, jakub
_________________
http://gps-y.pl/
http://goralevent.pl/
Back to top
View user's profile Send private message
Treiks
Tux's lil' helper
Tux's lil' helper


Joined: 15 Apr 2004
Posts: 82

PostPosted: Thu Oct 20, 2005 5:10 am    Post subject: Reply with quote

1) A wez wyswietl .bash_profile, .bashrc. (po za tym nie masz jakiegoś dziwnego umask ustawionego?)
2) Probowałeś ustawić shell logowania na coś innego niż bash?
3) jesli chcesz korzystać z wszelkich udogonien roota (miedzy innymi zmienncyh srodowiskowych...) to powinno się logować nie su USER ale su - USER
4) może gdzieś ustawiles jakś dziwna zmianę wlasnosci dla jakiegos UIDu i teraz sie wali?
Back to top
View user's profile Send private message
akub
Tux's lil' helper
Tux's lil' helper


Joined: 03 Aug 2004
Posts: 123
Location: Poland, Olkusz/Gliwice

PostPosted: Thu Oct 20, 2005 8:59 am    Post subject: Reply with quote

.bashrc
Code:

# /etc/skel/.bashrc:
# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/files/dot-bashrc,v 1.3 2005/07/06 22:10:22 vapier Exp $
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can't tolerate any output.


# Test for an interactive shell.  There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
# outputting anything in those cases.
if [[ $- != *i* ]]; then
   # Shell is non-interactive.  Be done now
   return
fi

# Shell is interactive.  It is okay to produce output at this point,
# though this example doesn't produce any.  Do setup for
# command-line interactivity.

# colors for ls, etc.  Prefer ~/.dir_colors #64489
if [[ -f ~/.dir_colors ]]; then
   eval `dircolors -b ~/.dir_colors`
else
   eval `dircolors -b /etc/DIR_COLORS`
fi
alias ls="ls --color=auto"

# Change the window title of X terminals
case $TERM in
   xterm*|rxvt*|Eterm)
      PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
      ;;
   screen)
      PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"'
      ;;
esac

# uncomment the following to activate bash-completion:
#[ -f /etc/profile.d/bash-completion ] && source /etc/profile.d/bash-completion


.bash_profile
Code:

# /etc/skel/.bash_profile:
# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/files/dot-bash_profile,v 1.1 2005/04/30 00:08:01 vapier Exp $

# This file is sourced by bash for login shells.  The following line
# runs your .bashrc and is recommended by the bash info pages.
[[ -f ~/.bashrc ]] && . ~/.bashrc


Ad 2
Nie probowalemnic kombinowac

Ad 3
zapamietam

Ad 4
nic nie ustawialem i nic nie kombinowalem

To sie stalo po ktorejs z kolei aktualizacji, tylko niezbyt czesto sie probowalem logowac na inne konto i nie wylapalem po ktorej

pozdrawiam, jakub
_________________
http://gps-y.pl/
http://goralevent.pl/
Back to top
View user's profile Send private message
Treiks
Tux's lil' helper
Tux's lil' helper


Joined: 15 Apr 2004
Posts: 82

PostPosted: Thu Oct 20, 2005 3:02 pm    Post subject: Reply with quote

Wygląda OK.
A w /etc/profile nie masz czegos dziwnego? Może jakieś ACL masz poustawiane?
Dodaj nowego usera i zobacz na niego su.
Czy tylko jak robisz su z jakuba to zmienia sie wlasnosc czy moze z innych tez?
Back to top
View user's profile Send private message
szolek
Guru
Guru


Joined: 30 Mar 2005
Posts: 570
Location: Brzóza Królewska

PostPosted: Thu Oct 20, 2005 3:24 pm    Post subject: Reply with quote

Code:
# adduser --help
(...)
  -m, --create-home      twóż katalog domowy dla nowego użytkownika
(...)

Mam nadzieje że nie zapomniałeś. Przeciwnie nie bedzie dziwną ta sytuacja.
Back to top
View user's profile Send private message
akub
Tux's lil' helper
Tux's lil' helper


Joined: 03 Aug 2004
Posts: 123
Location: Poland, Olkusz/Gliwice

PostPosted: Thu Oct 20, 2005 4:20 pm    Post subject: Reply with quote

/etc/profile
Code:

 /etc/profile: login shell setup
#
# That this file is used by any Bourne-shell derivative to setup the
# environment for login shells.
#

# Load environment settings from profile.env, which is created by
# env-update from the files in /etc/env.d
if [ -e /etc/profile.env ] ; then
   . /etc/profile.env
fi

# 077 would be more secure, but 022 is generally quite realistic
umask 022

# Set up PATH depending on whether we're root or a normal user.
# There's no real reason to exclude sbin paths from the normal user,
# but it can make tab-completion easier when they aren't in the
# user's PATH to pollute the executable namespace.
#
# It is intentional in the following line to use || instead of -o.
# This way the evaluation can be short-circuited and calling whoami is
# avoided.
if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then
   PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${ROOTPATH}"
else
   PATH="/usr/local/bin:/usr/bin:/bin:${PATH}"
fi
export PATH
unset ROOTPATH

# Extract the value of EDITOR
[ -z "$EDITOR" ] && EDITOR="`. /etc/rc.conf 2>/dev/null; echo $EDITOR`"
[ -z "$EDITOR" ] && EDITOR="/bin/nano"
export EDITOR

if [ -n "${BASH_VERSION}" ] ; then
   # Newer bash ebuilds include /etc/bash/bashrc which will setup PS1
   # including color.  We leave out color here because not all
   # terminals support it.
   if [ -f /etc/bash/bashrc ] ; then
      # Bash login shells run only /etc/profile
      # Bash non-login shells run only /etc/bash/bashrc
      # Since we want to run /etc/bash/bashrc regardless, we source it
      # from here.  It is unfortunate that there is no way to do
      # this *after* the user's .bash_profile runs (without putting
      # it in the user's dot-files), but it shouldn't make any
      # difference.
      . /etc/bash/bashrc
   else
      PS1='\u@\h \w \$ '
   fi
else
   # Setup a bland default prompt.  Since this prompt should be useable
   # on color and non-color terminals, as well as shells that don't
   # understand sequences such as \h, don't put anything special in it.
   PS1="`whoami`@`uname -n | cut -f1 -d.` \$ "
fi



dodalem nowego usera o nazwie lama :-) wszystko w gnome zalogowany jako jakub i i po utworzeniu katalogu (--create-home)

Code:

akub jakub # adduser lama -m -G users,wheel
akub jakub # su - lama
Nie można zmienić katalogu na "/home/lama"


i wlascicielem katalogu /home/lama jest jakub

pozdrawiam, jakub
_________________
http://gps-y.pl/
http://goralevent.pl/
Back to top
View user's profile Send private message
szolek
Guru
Guru


Joined: 30 Mar 2005
Posts: 570
Location: Brzóza Królewska

PostPosted: Thu Oct 20, 2005 4:44 pm    Post subject: Reply with quote

Ja mam kilka pytań:
1. Jak długo masz ten system?
2. Jaki system plików?
3. Co wywala ls -al /home?
4. Jak często aktualizujesz i czy etc-update jest u cienie w rozsądnym użyciu?

Jeszcze jedno mi przychodzi na myśl. Logowanie w konsoli a nie przez su. Ewentualnie wykasować zawartości katalogów domowych, ale ważne pliki skopiuj. I ewentualnie nowe zalogowanie.
Back to top
View user's profile Send private message
Treiks
Tux's lil' helper
Tux's lil' helper


Joined: 15 Apr 2004
Posts: 82

PostPosted: Fri Oct 21, 2005 5:40 am    Post subject: Reply with quote

Sokoro jako "jakub" dodajesz usera wiec wnosze, ze ten uzytkownik ma gdzies przypisane prawa do usera UID=0 albo grupy adm.
A jak dodasz kogos jako user z UID=0 (root) to wlascicielem katalogu tez jest root?
Sprawdz wynik:
cat /etc/default/useradd
oraz zawartosc /etc/skel
Back to top
View user's profile Send private message
akub
Tux's lil' helper
Tux's lil' helper


Joined: 03 Aug 2004
Posts: 123
Location: Poland, Olkusz/Gliwice

PostPosted: Fri Oct 21, 2005 10:32 am    Post subject: Reply with quote

ale to nie chodzi tylko o nowego uzytkownika, mialem tez konto gosc i na niego tez sie nie dalo logowac, dopiero musialem jako root ustawic prawa do /home/gosc na gosc:users zeby moc sie zalogowac, tylko ze wtedy wlascicielem wszystkich katalogow w /home/ jest gosc i zeby z powrotem sie zalogowac na jakuba musialem tak samo zmienic prawa i tak w kolko

np. nie jest mozliwe zalogowanie sie poprzez przelacz uzytkownika

i to nie jest wina nowego uzytkownika

system mam od wakacji bo robilem nowa instalacje
system plikow reiserfs
aktualizuje co 2 dni srednio, etc-update uzywam rozsadnie
nic innego nie moge sprawzdic bo nie ma mnie w akademiku dopiero w niedziele bede mial dostep do tamtego kompa

pozdrawiam, jakub
_________________
http://gps-y.pl/
http://goralevent.pl/
Back to top
View user's profile Send private message
Treiks
Tux's lil' helper
Tux's lil' helper


Joined: 15 Apr 2004
Posts: 82

PostPosted: Fri Oct 21, 2005 3:25 pm    Post subject: Reply with quote

No wdlatego włąsnie pytam czy jak dodasz uzytkownika jako root (a nie jakos user z prawami roota) i zrobisz z roota su - (a nie z użytkownika z prawami roota) to tez zmienia sie prawo wlasnosci do katalogu domowego?
(wygodniej byloby to zrobic z roota i dodac usera i dalej su - bo to ewentualnie tez moze cos powiedziec. Czy starac sie szukac gdzies w systemie czy na koncie jakub)

Quote:

np. nie jest mozliwe zalogowanie sie poprzez przelacz uzytkownika

A bo do tego to juz w Pamie ktos musi zmienic policy albo z whhelem pokombinowac.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum