-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>>>> "skg" == S K Goel <[EMAIL PROTECTED]> writes:

    skg> Actually I want User X, Y and Z to be use telnet but not ssh.
    skg> while user A, B and C can be use ssh but not telnet

Something along the lines of:

groupadd telnet
groupadd ssh
chgrp telnet `which telnet`
chgrp ssh `which ssh`
chmod 550 `which telnet` `which ssh`
for u in <list of telnet users>
do
        groups=`groups $u | sed -e "s/^$u : //" -e 's/ /,/g'`
        groups="$groups,telnet"
        usermod -G $groups $u
done
for u in <list of ssh users>
do
        groups=`groups $u | sed -e "s/^$u : //" -e 's/ /,/g'`
        groups="$groups,ssh"
        usermod -G $groups $u
done

Don't run this without testing!  If (when) it works you owe me a cold
soda.

Regards,

- -- Raju
- -- 
Raj Mathur                [EMAIL PROTECTED]      http://kandalaya.org/
       GPG: 78D4 FC67 367F 40E2 0DD5  0FEF C968 D0EF CC68 D17F
                      It is the mind that moves
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iD8DBQFCaqamyWjQ78xo0X8RAmjPAJ9VLtBLbGxAtNYMcWQvnUkhv2PeKACfW8mT
HRH3vbiqHc/N4keUZ0aMwI8=
=r80B
-----END PGP SIGNATURE-----

_______________________________________________
ilugd mailinglist -- [email protected]
http://frodo.hserus.net/mailman/listinfo/ilugd
Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi 
http://www.mail-archive.com/[email protected]/

Reply via email to