Hello Otto, all, 

[email protected] (Otto Moerbeek), 2010.12.05 (Sun) 22:56 (CET):
> On Sun, Dec 05, 2010 at 07:58:34PM +0100, MERIGHI Marcus wrote:
> > When I use ``login -f $USER'' in default shell I am prompted for
> > ``Password:''. What am I getting wrong about login(1) saying:
> > 
> > -f      The -f option is used when a user name is specified to indicate
> >         that proper authentication has already been done and that no
> >         password need be requested.  This option may only be used by the
> >         superuser or when an already logged in user is logging in as
> >         themselves.
> > 
> > (It works as expected when run as root or with sudo, though)
> You fall into the "Note that if login is invoked by a non-root user,
> it will execute su(1) in login emulation mode instead." case.

my reading capabilities again. Thanks for pointing that out. 

> I believe this is a documentation error.

Since su(1) does not provide the equivalent functionality (hoping my
reading was better this time) I suggest the following diff:

Index: login.1
===================================================================
RCS file: /cvs/src/usr.bin/login/login.1,v
retrieving revision 1.28
diff -u -r1.28 login.1
--- login.1     16 Oct 2009 12:29:37 -0000      1.28
+++ login.1     6 Dec 2010 09:12:42 -0000
@@ -70,8 +70,7 @@
 option is used when a user name is specified to indicate that proper
 authentication has already been done and that no password need be
 requested.
-This option may only be used by the superuser or when an already
-logged in user is logging in as themselves.
+This option may only be used by the superuser.
 .It Fl h Ar hostname
 Specifies the host from which the connection was received.
 This option may only be used by the superuser.

Reply via email to