This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: problems setting permissions for sshd


On Tue, 29 Oct 2002, Marcos Lorenzo wrote:

    > Harig, Mark A. <maharig@idirect.net> wrote [11:21am -0500]
    > 
    >    HMA > Yes, which implies that Marcos Lorenzo should regenerate
    >    HMA > his /etc/group file from scratch with 'mkgroup', and
    >    HMA > then edit it to add 'Administrators'.
    > 
    > mkgroup for /etc/group and mkpasswd for /etc/passwd then?
    > 
    > Ok, I'll try it and then I told you.
    > 
    > Thanks everyone
    > m4c.
    > 

OK. That worked:

marcos@MOZART /etc$ for i in * ; do [ -f "$i" ] && chmod 640 "$i" ; [ -d
"$i" ] && chmod 750 "$i" ; done
marcos@MOZART /etc$ d
total 600k
drwx------   13 admin    domusers      12k Oct 30 12:09 .
drwx------   13 admin    domusers     4.0k Oct 29 12:52 ..
-rw-r-----    1 admin    domadmin      85k Jul 10 04:28 Muttrc
drwxr-x---    2 admin    domadmin     4.0k Sep 18 11:54 WindowMaker
drwxr-x---   13 admin    domadmin     4.0k Sep 18 11:55 X11
drwxr-x---    2 admin    domadmin     4.0k Sep 18 11:43 apache
drwxr-x---    2 admin    domadmin        0 Sep 18 14:10 cron.d
-rw-r-----    1 admin    domadmin     1.3k Feb 19  2002 csh.cshrc
-rw-r-----    1 admin    domadmin      401 Dec 21  2001 csh.login
-rw-r-----    1 admin    domadmin     4.7k Sep 19 19:00 enscript.cfg
-rw-r-----    1 admin    domadmin     4.7k Aug 25 23:31 enscript.cfg.default

Now my passwd and group files are:

marcos@MOZART ~$ cat /etc/passwd
all:*:0:0:,S-1-1-0::
system:*:18:18:,S-1-5-18::
admin:*:544:544:,S-1-5-32-544::
domadmin:unused_by_nt/2000/xp:500:512:U-DIT\Administrador,S-1-5-21-462973936-1154566708-996637233-500:/home/Administrador:/bin/bash
guest:unused_by_nt/2000/xp:501:514:U-DIT\Invitado,S-1-5-21-462973936-1154566708-996637233-501:/home/Invitado:/bin/bash
ivan:unused_by_nt/2000/xp:1004:512:Iván Alonso Gutiérrez,U-DIT\ivan,S-1-5-21-462973936-1154566708-996637233-1004:/home/ivan:/bin/bash
lab:unused_by_nt/2000/xp:1005:513:Usuario estándar para las prácticas,U-DIT\lab,S-1-5-21-462973936-1154566708-996637233-1005:/home/lab:/bin/bash
marcos:unused_by_nt/2000/xp:1003:512:Marcos Lorenzo de Santiago,U-DIT\marcos,S-1-5-21-462973936-1154566708-996637233-1003:/home/marcos:/bin/bash
sshd:unused_by_nt/2000/xp:1079:513:sshd privsep,U-DIT\sshd,S-1-5-21-462973936-1154566708-996637233-1079:/var/empty:/bin/bash

marcos@MOZART ~$ cat /etc/group
everyone:S-1-1-0:0:
system:S-1-5-18:18:
domusers:S-1-5-21-462973936-1154566708-996637233-513:513:
admin:S-1-5-32-544:544:
domadmin:S-1-5-32-512:512:
duplicat:S-1-5-32-552:552:
guests:S-1-5-32-546:546:
copy operators:S-1-5-32-551:551:
account operators:S-1-5-32-548:548:
print operators:S-1-5-32-550:550:
servers operators:S-1-5-32-549:549:
users:S-1-5-32-545:545:

I added group domadmin as mkgroup didn't show this group (Domain
Administrators).

But now I when I ssh my machine (sshd runs perfectly) I get the
following error:

marcos@MOZART ~$ ssh mozart
marcos@mozart's password:
Permission denied, please try again.

and my event log viewer says:

sshd : Win32 Process Id = 0xF1 : Cygwin Process Id = 0xF1 : Failed
password for illegal user marcos from 163.117.144.225 port 2049 ssh2.

Another thing:

marcos@MOZART /tmp$ d
total 8.0k
drwxrwxrwx    3 admin    domadmin     4.0k Oct 30 12:33 .
drwx------   14 admin    domadmin     4.0k Oct 30 12:24 ..
drwxr-x---    0 system   domadmin        0 Oct 30 12:33 pepe
marcos@MOZART /tmp$ cd pepe/
bash: cd: pepe/: Permission denied
marcos@MOZART /tmp$ id
uid=1003(marcos) gid=512(domadmin) groups=0(everyone),513(domusers),544(admin),545(users)
marcos@MOZART /tmp$ groups
domadmin everyone domusers admin users

And if I do:

marcos@MOZART /tmp$ chmod o+rx pepe/
marcos@MOZART /tmp$ d
total 8.0k
drwxrwxrwx    3 admin    domadmin     4.0k Oct 30 12:33 .
drwx------   14 admin    domadmin     4.0k Oct 30 12:24 ..
drwxr-xr-x    2 system   domadmin        0 Oct 30 12:33 pepe
marcos@MOZART /tmp$ cd pepe/
marcos@MOZART /tmp/pepe$ ls
marcos@MOZART /tmp/pepe$ d
total 4.0k
drwxr-xr-x    2 system   domadmin        0 Oct 30 12:33 .
drwxrwxrwx    3 admin    domadmin     4.0k Oct 30 12:33 ..
marcos@MOZART /tmp/pepe$

Why I can't cd to this folder if I belong to the group domadmin and I have
read and execution permissions?


Maybe the two errors above have any relation... but I can't see what's
going on.



thx,
m4c.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]