login.conf limits

Lowell Gilbert freebsd-questions-local at be-well.ilk.org
Tue Jun 14 14:11:34 GMT 2005

Please don't top-post.

Kövesdán Gábor <gabor.kovesdan at t-hosting.hu> writes:

> Hello,
> I've done a new class "shuser" with some limits, rebuild the cap
> database and made a new user "tester" with adduser. When it asked for
> the login class, I specified shuser, and tried to login with ssh, but
> it failed. My shuser class:
> shuser:\
>         :passwd_format=md5:\
>         #:passwordtime=90d:\
>         #:idletime=30m:\
>         #:login-retries=3:\
>         #:sessionlimit=1:\
>         :copyright=/etc/COPYRIGHT:\
>         :welcome=/etc/motd:\
>         :setenv=MAIL=/var/mail/$,BLOCKSIZE=K,FTP_PASSIVE_MODE=YES:\
>         :path=/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin
> /usr/local/bin /usr/X11R6/bin ~/bin:\
>         #:lang=hu_HU.ISO8859-2:\
>         #:charset=iso-8859-2:\
>         #:ftp-chroot=true:\
>         :nologin=/var/run/nologin:\
>         :cputime=unlimited:\
>         :datasize=unlimited:\
>         :stacksize=unlimited:\
>         #:memorylocked=15m:\
>         #:memoryuse=10m:\
>         :filesize=unlimited:\
>         #:coredumpsize=5m:\
>         #:openfiles=3:\
>         #:maxproc=3:\
>         #:sbsize=512k:\
>         #:vmemoryuse=5m:\
>         :priority=0:\
>         :ignoretime@:\
>         :umask=027:
> After the first try I inserted those hashmarks before the modified
> lines, but it still doesn't work. Did I make something wrong?

> Lowell Gilbert wrote:
> >What happens if testuser is assigned the default login class?  Does
> >the login still fail?  [If so, it has nothing to do with your login
> > settings.]
> In this case it works.

Okay, so it is the login settings.

I'm a little suspicious of commenting out the lines in the middle of
the settings.  I think that may comment out the continuation
character, ending the setting at that point.  Try moving those lines
out of the way and rebuild the database.  It also might be a good idea
to include the default entry explicitly at the end, to make sure you
know you have good defaults.

More information about the freebsd-questions mailing list