11-10-2010
As I understand it, you're trying to login with a password noninteractively? These commands read from /dev/tty as a security feature, to prevent people from being able to login with stored plaintext passwords. In other words, a less-than-subtle hint that you're not supposed to be using stored passwords to login.
Would it be possible to use ssh for this? It supports noninteractive login methods such as keys. Or configure your system to let you and only you login to one and only one specific thing without a password via the sudo utility.
Worst case, if you absolutely must, you might be able to fool it with things like the expect tool, but this is convoluted and very hard to make secure.
This User Gave Thanks to Corona688 For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
When it proccesing the backup with cpio report this message: Cannot open "/dev/tty" and cancel de backup.
Cuando se procesa la tarea del backup reporta el error: Cannot open "/dev/tty" y cancela el backup y no termina correctamente, a que se devera esta advertencia.
Gracias.
Thacks.... (3 Replies)
Discussion started by: cmr88
3 Replies
2. Solaris
Hi, Anyone can help
My solaris 8 system has the following
/dev/null , /dev/tty and /dev/console
All permission are lrwxrwxrwx
Can this be change to a non-world write ??
any impact ?? (12 Replies)
Discussion started by: civic2005
12 Replies
3. Programming
hello all,
Being root, I would like to log user activity (also multiple root activity), i don't really like
history file based logging, lets assume that users have access to their .profile.
I would like to write a monitoring daemon in C that would capture /dev/ttys,
so I need to do a... (0 Replies)
Discussion started by: wayward
0 Replies
4. SCO
Hi,
I'm new here, so please dont shoot me if I forgot something :)
Some SCO box we've (our company) got recently from a new customer runs an app that hangs the entire box every once in a while.
Today when an admin tried to start the db we got this error:
$ dbstart
dbstart: line 22: cannot... (6 Replies)
Discussion started by: necron
6 Replies
5. Programming
Since the existence of /dev/tty is not guaranteed, what happens when an attempt is made to open /dev/tty and there's no controlling terminal?
Will it fail, or open /dev/null instead? Or do something else?
So is checking for NULL in the code below a safe way of checking whether opening... (2 Replies)
Discussion started by: gencon
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I need to provide more than one character to "> /dev/tty" through terminal/keyboard input, I have this:
ok=false
while
do
echo " Enter r1 to reformat "
> /dev/tty
read choice
case $choice in
)
echo " bla bla bla "
;;
done
However, in this way,... (3 Replies)
Discussion started by: Gery
3 Replies
7. UNIX for Dummies Questions & Answers
what can I use to find the last modified time of a /dev/tty ? (4 Replies)
Discussion started by: l flipboi l
4 Replies
8. Solaris
Hi
i need to install a software into a zone, and this kind of software needs to have a file who is linked into /dev.
But it is not possible to create a link into /dev nor create a file into it.
-bash-3.00# ln -s /tmp/testfile /dev/
ln: cannot create /dev//testfile: Permission denied... (2 Replies)
Discussion started by: beta17
2 Replies
9. UNIX for Dummies Questions & Answers
hi,
From the below script:
##########################################pwd_auth.sh########################################################################################
#Author: Pandeeswaran Bhoopathy
#Written on:26th Jan 2012 2:00PM
#This script describes the feature of stty and illustrates... (3 Replies)
Discussion started by: pandeesh
3 Replies
10. Shell Programming and Scripting
Suppose another person wrote the following one-line shell script:
echo $RANDOM > /dev/tty
QUESTION #1: How can the random number, which is output to the terminal by this script, be captured in a variable?
QUESTION #2: How can this be done in a cron job?
Specific code, whether in ksh or... (1 Reply)
Discussion started by: Paul R
1 Replies
LEARN ABOUT SUSE
login.krb5
LOGIN(8) System Manager's Manual LOGIN(8)
NAME
login.krb5 - kerberos enhanced login program
SYNOPSIS
login.krb5 [-p] [-fFe username] [-r | -k | -K | -h hostname]
DESCRIPTION
login.krb5 is a modification of the BSD login program which is used for two functions. It is the sub-process used by krlogind and telnetd
to initiate a user session and it is a replacement for the command-line login program which, when invoked with a password, acquires Ker-
beros tickets for the user.
login.krb5 will prompt for a username, or take one on the command line, as login.krb5 username and will then prompt for a password. This
password will be used to acquire Kerberos Version 5 tickets (if possible.) It will also attempt to run aklog to get AFS tokens for the
user. The version 5 tickets will be tested against a local krb5.keytab if it is available, in order to verify the tickets, before letting
the user in. However, if the password matches the entry in /etc/passwd the user will be unconditionally allowed (permitting use of the
machine in case of network failure.)
OPTIONS
-p preserve the current environment
-r hostname
pass hostname to rlogind. Must be the last argument.
-h hostname
pass hostname to telnetd, etc. Must be the last argument.
-f name
Perform pre-authenticated login, e.g., datakit, xterm, etc.; allows preauthenticated login as root.
-F name
Perform pre-authenticated login, e.g., datakit, xterm, etc.; allows preauthenticated login as root.
-e name
Perform pre-authenticated, encrypted login. Must do term negotiation.
CONFIGURATION
login.krb5 is also configured via krb5.conf using the login stanza. A collection of options dealing with initial authentication are pro-
vided:
krb5_get_tickets
Use password to get V5 tickets. Default value true.
krb_run_aklog
Attempt to run aklog. Default value false.
aklog_path
Where to find it [not yet implemented.] Default value $(prefix)/bin/aklog.
accept_passwd
Don't accept plaintext passwords [not yet implemented]. Default value false.
DIAGNOSTICS
All diagnostic messages are returned on the connection or tty associated with stderr.
SEE ALSO
rlogind(8), rlogin(1), telnetd(8)
LOGIN(8)