Re: Поменял shell root'у - как залогинится?

2011-04-10 Пенетрантность Kpykcъ

On Fri, 8 Apr 2011, alexander barakin wrote:

хорошая реклама для решения "не пользуйтесь root-овой учёткой, настройте sudo".
Сам ленив и пользуюсь суду, но на этот счет есть разные авторитетные 
мнения.


Просто сидя под рутом, надо всегда думать прежде чем делать, никогда не 
спешить и не эксперементировать, если не хочется провести выходные за 
монитором.


Я за время пользования юниксами, наступал на все перечисленные грабли,
неоднократно... Так что повесить где-то в радиусе обзора такие правила не 
помешает, чтоб не забывать :).


П.С. По сути вопроса,

при локальном доступе к машине, вариант с 
init=/bin/bash представляется лучшим советом.
Итого: 1. запустится с этой опцией, 2. перемонтировать ФС в запись, 3. 
отредактировать и сохранить файл. 4. перезагрузиться в нормальный режим.


--
WBR Olekѕandr Lavruschenko
graduate student, Aerospace Department,
National Technical University of Ukraine "Kiev Polytechnic Institute"
web: http://pskla.kpi.ua/staff/lavrushchenko

Re: Поменял shell root'у - как залогинится?

2011-04-08 Пенетрантность Nicholas

On 08.04.2011 14:26, Bogdan wrote:

Добрый день!

Сделал глупость: chsh -s /usr/bin/rsh


Загрузитесь с live флешки, подмонтируйте диск и отредактируйте не нем файл

/etc/passwd

root:x:0:0:root:/root:/bin/sh  (а лучше zsh)



--
Sincerely,
Nicholas


--
To UNSUBSCRIBE, email to debian-russian-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/innku9$i00$1...@dough.gmane.org



Re: Поменял shell root'у - как залогинится?

2011-04-08 Пенетрантность Andrey Rahmatullin
On Fri, Apr 08, 2011 at 05:26:03PM +0300, Bogdan wrote:
> Добрый день!
> 
> Сделал глупость: chsh -s /usr/bin/rsh
> 
> Теперь ни ssh root@host /bin/sh ни su --shell /bin/sh не работают -
> Unknown cipher type 'ls'
Машина удалённая?

-- 
WBR, wRAR
Powered by the ALT Linux fortune(6):

 wRAR: я тебя убью
 * Lost .oO(раорн признался врару в убви)


signature.asc
Description: Digital signature


Re: Поменял shell root'у - как залогинится?

2011-04-08 Пенетрантность alexander barakin
2011/4/8 Bogdan :
> Добрый день!
>
> Сделал глупость: chsh -s /usr/bin/rsh
>
> Теперь ни ssh root@host /bin/sh ни su --shell /bin/sh не работают -
> Unknown cipher type 'ls'
>
> Т.е. запускается-таки shell.
> При этом, в man su сказано:
>
> -s, --shell SHELL
>           The shell that will be invoked.
>
>           The invoked shell is chosen from (highest priority first):
>               The shell specified with --shell.
>               If --preserve-environment is used, the shell specified
> by the $SHELL environment variable.
>               The shell indicated in the /etc/passwd entry for the target 
> user.
>               /bin/sh if a shell could not be found by any above method.
>
> Юзерский shell на хосте есть, sudo нет.
>
> Debian 5 со всеми апдейтами.

хорошая реклама для решения "не пользуйтесь root-овой учёткой, настройте sudo".

-- 
wbr, alexander barakin aka sash-kan.


Re: Поменял shell root'у - как залогинится?

2011-04-08 Пенетрантность Peter Pentchev
On Fri, Apr 08, 2011 at 05:26:03PM +0300, Bogdan wrote:
> Добрый день!
> 
> Сделал глупость: chsh -s /usr/bin/rsh
> 
> Теперь ни ssh root@host /bin/sh ни su --shell /bin/sh не работают -
> Unknown cipher type 'ls'
> 
> Т.е. запускается-таки shell.
> При этом, в man su сказано:
> 
> -s, --shell SHELL
>The shell that will be invoked.
> 
>The invoked shell is chosen from (highest priority first):
>The shell specified with --shell.
>If --preserve-environment is used, the shell specified
> by the $SHELL environment variable.
>The shell indicated in the /etc/passwd entry for the target 
> user.
>/bin/sh if a shell could not be found by any above method.
> 
> Юзерский shell на хосте есть, sudo нет.
> 
> Debian 5 со всеми апдейтами.

Попробуйте "su -m root".

Если не поможет, надо рестартировать систему в single-user mode,
а можно и не поможет другое чем linux init=/bin/bash

Всего лучшего,
Петр

-- 
Peter Pentchev  r...@ringlet.net r...@freebsd.org pe...@packetscale.com
PGP key:http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
When you are not looking at it, this sentence is in Spanish.


signature.asc
Description: Digital signature


Поменял shell root'у - как залогинится?

2011-04-08 Пенетрантность Bogdan
Добрый день!

Сделал глупость: chsh -s /usr/bin/rsh

Теперь ни ssh root@host /bin/sh ни su --shell /bin/sh не работают -
Unknown cipher type 'ls'

Т.е. запускается-таки shell.
При этом, в man su сказано:

-s, --shell SHELL
   The shell that will be invoked.

   The invoked shell is chosen from (highest priority first):
   The shell specified with --shell.
   If --preserve-environment is used, the shell specified
by the $SHELL environment variable.
   The shell indicated in the /etc/passwd entry for the target user.
   /bin/sh if a shell could not be found by any above method.

Юзерский shell на хосте есть, sudo нет.

Debian 5 со всеми апдейтами.

-- 
WBR,  Bogdan B. Rudas


--
To UNSUBSCRIBE, email to debian-russian-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/BANLkTincz=zx17b_hqjshbyqucx4pys...@mail.gmail.com