LinuxForum.Fans
Тема

Проблема с правами у пользователей

Автор: koka3000 33 сообщений 2724 просмотров
#282425

Да, пользователю нужно выполнить:

text

cd ~username/.ssh
cat ssh_key >> authorized_keys
#282426

find /home/wow ! -user wow -ls
ПУСТО!

Вход по ssh:

text
Could not chdir to home directory /home/wow: Permission denied
-bash: /home/wow/.bash_profile: Permission denied
wow@triton506:/$ pwd
/
wow@triton506:/$ cd /home/wow
-bash: cd: /home/wow: Permission denied
#282427
"koka3000" написал:
find /home/wow ! -user wow -ls
ПУСТО!

А так

text
find /home/wow ! -user 1000 -ls
#282428

Да, и покажите

text

ls -ln /home/wow
#282429

find /home/wow ! -user 1000 -ls
ПУСТО

Lupo Alberto написал:
Да, и покажите
text

ls -ln /home/wow

text
total 141540
-rwxrwxrwx  1 1000 1000       454 Jul 31 07:46 auth.sh
drwxrwxrwx  2 1000 1000      4096 Oct 24 13:59 bin
drwxrwxrwx  2 1000 1000      4096 Aug  7 15:31 build
-rwxrwxrwx  1 1000 1000         0 Aug 22 06:28 Char.log
-rwxrwxrwx  1 1000 1000         0 Aug 22 06:05 Chat.log
-rwxrwxrwx  1 1000 1000       182 Aug  7 15:31 compile.sh
drwxrwxrwx 10 1000 1000      4096 Jul 30 19:05 core
drwxrwxrwx  7 1000 1000      4096 Aug 26 06:00 core_external
drwxrwxrwx  8 1000 1000      4096 Aug  7 15:32 core_new_04_08_12
drwxrwxrwx  9 1000 1000      4096 Aug 12 09:08 core_new_11_08_12
drwxrwxrwx  8 1000 1000      4096 Aug 11 11:20 core_new_11_08_12_old
drwxrwxrwx  9 1000 1000      4096 Aug 12 14:39 core_new_12_08_12
drwxrwxrwx  7 1000 1000      4096 Aug 26 06:15 core_new_19_08_12
drwxrwxrwx 10 1000 1000      4096 Jul 30 12:47 core_new_26_07_12
drwxrwxrwx 10 1000 1000      4096 Jul 25 13:58 core_neww
drwxrwxrwx 10 1000 1000      4096 Aug 20 09:14 data
-rwxrwxrwx  1 1000 1000     15274 Jun 11 16:08 database.sql
-rwxrwxrwx  1 1000 1000    424720 Aug 22 06:28 DBErrors.log
drwxrwxrwx  3 1000 1000      4096 Sep 29 09:44 dump
drwxrwxrwx  2 1000 1000      4096 Oct 26 18:36 etc
drwxrwxrwx  7 1000 1000      4096 Aug 19 18:25 GameCore
drwxrwxrwx  7 1000 1000      4096 Sep 14 17:13 game_core_14_09_12
drwxrwxrwx  2 1000 1000     24576 Oct 26 19:05 log
drwxrwxrwx 10 1000 1000      4096 Jul 25 09:20 new_core
drwxrwxrwx  7 1000 1000      4096 Sep 14 17:44 new_core_14_09_12
drwxrwxrwx  7 1000 1000      4096 Sep 15 17:09 new_core_15_09_12
drwxrwxrwx  7 1000 1000      4096 Oct 21 16:36 new_core_21_10_2012
drwxrwxrwx  7 1000 1000      4096 Sep 22 11:01 new_core_22_09_12
drwxrwxrwx  7 1000 1000      4096 Oct 23 14:15 new_core_23_10_12
drwxrwxrwx  7 1000 1000      4096 Oct 24 13:54 new_core_24_10_12
drwxrwxrwx  7 1000 1000      4096 Aug 26 19:08 new_core_26_08_12
drwxrwxrwx  7 1000 1000      4096 Aug 28 05:28 new_core_27_08_12
drwxrwxrwx  7 1000 1000      4096 Aug 30 05:56 new_core_29_08_12
drwxrwxrwx  7 1000 1000      4096 Oct 21 16:38 new_core_29_09_12
drwxrwxrwx  8 1000 1000      4096 Sep 14 17:47 new_core_30_08_12
drwxrwxrwx  2 1000 1000      4096 Jul 10 18:35 old_bin
drwxrwxrwx  6 1000 1000      4096 Jun 13 05:24 old_data
-rwxrwxrwx  1 1000 1000        57 Oct 26 18:59 restarter_a.log
-rwxrwxrwx  1 1000 1000 144161853 Oct 27 14:44 restarter_w.log
drwxrwxrwx  2 1000 1000      4096 Jul 10 18:48 sql
-rwxrwxrwx  1 1000 1000       105 Oct 26 18:59 start.sh
-rwxrwxrwx  1 1000 1000        28 Jul 31 07:41 stop.sh
drwxrwxrwx  2 1000 1000      4096 Jul 10 19:00 update_sql
-rwxrwxrwx  1 1000 1000         0 Aug 22 06:05 Warden.log
-rwxrwxrwx  1 1000 1000       377 Oct 26 18:57 world.sh
#282431

Идеи почти закончились :(
А так?

text
ls -aln /home/wow/.ssh 

P.S. В support обращаться не пробовали?
P.S.S.

text

chmod -R 777

вы зря делали, все файлы теперь исполняемые. Чем это чревато, можно только предполагать.

#282432

/home/wow/.ssh а такого файла нет! И у root тоже!

#282433
"koka3000" написал:
/home/wow/.ssh а такого файла нет! И у root тоже!

Бывает...
Покажите файл /etc/ssh/sshd_config.

P.S. У вас ничего подобного SELinux не включено?

#282435
"koka3000" написал:
/home/wow/.ssh а такого файла нет! И у root тоже!
text

ls -al

У меня это не файл, а каталог.

#282438

Только либа libselinux1 2.0.96-1 SELinux runtime shared libraries
А так ничего не должно было быть.

Вот sshd_config:

text
moduli                sshd_config           ssh_host_dsa_key.pub  ssh_host_rsa_key.pub
ssh_config            ssh_host_dsa_key      ssh_host_rsa_key
triton506:~# clear && clear && cat /etc/ssh/sshd_config
# Package generated configuration file
# See the sshd_config(5) manpage for details

# What ports, IPs and protocols we listen for Port 22 # Use these options to restrict which interfaces/protocols sshd will bind to #ListenAddress :: #ListenAddress 0.0.0.0 Protocol 2 # HostKeys for protocol version 2 HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_dsa_key #Privilege Separation is turned on for security UsePrivilegeSeparation yes

# Lifetime and size of ephemeral version 1 server key KeyRegenerationInterval 3600 ServerKeyBits 768

# Logging SyslogFacility AUTH LogLevel INFO

# Authentication: LoginGraceTime 120 PermitRootLogin yes StrictModes yes

RSAAuthentication yes PubkeyAuthentication yes #AuthorizedKeysFile %h/.ssh/authorized_keys

# Don't read the user's ~/.rhosts and ~/.shosts files IgnoreRhosts yes # For this to work you will also need host keys in /etc/ssh_known_hosts RhostsRSAAuthentication no # similar for protocol version 2 HostbasedAuthentication no # Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication #IgnoreUserKnownHosts yes

# To enable empty passwords, change to yes (NOT RECOMMENDED) PermitEmptyPasswords no

# Change to yes to enable challenge-response passwords (beware issues with # some PAM modules and threads) ChallengeResponseAuthentication no

# Change to no to disable tunnelled clear text passwords #PasswordAuthentication yes

# Kerberos options #KerberosAuthentication no #KerberosGetAFSToken no #KerberosOrLocalPasswd yes #KerberosTicketCleanup yes

# GSSAPI options #GSSAPIAuthentication no #GSSAPICleanupCredentials yes

X11Forwarding yes X11DisplayOffset 10 PrintMotd no PrintLastLog yes TCPKeepAlive yes #UseLogin no

#MaxStartups 10:30:60 #Banner /etc/issue.net

# Allow client to pass locale environment variables AcceptEnv LANG LC_*

Subsystem sftp /usr/lib/openssh/sftp-server

# Set this to 'yes' to enable PAM authentication, account processing, # and session processing. If this is enabled, PAM authentication will # be allowed through the ChallengeResponseAuthentication and # PasswordAuthentication. Depending on your PAM configuration, # PAM authentication via ChallengeResponseAuthentication may bypass # the setting of "PermitRootLogin without-password". # If you just want the PAM account and session checks to run without # PAM authentication, then enable this but set PasswordAuthentication # and ChallengeResponseAuthentication to 'no'. UsePAM yes

#282442
"koka3000" написал:
Только либа libselinux1 2.0.96-1 SELinux runtime shared libraries
А так ничего не должно было быть.

И всё же

text

getsebool -a
#282446

getsebool не установлен. Как вообще пакет этот называется?

#282516
"koka3000" написал:
Как вообще пакет этот называется?

libselinux-utils (rpm, кроме openSUSE)
или
selinux-utils (deb)
или
selinux-tools (openSUSE)

з.ы. название пакета зависит от системы

Войдите или зарегистрируйтесь, чтобы ответить.