05-16-2007
Try putting the following in the .profile.... or equivalent.
if test "$ALREADY_LOGGED_IN" != "$USER"
then
ALREADY_LOGGED_IN="$USER"
export ALREADY_LOGGED_IN
exec login $USER
fi
the exec login $USER should prompt for the password, the ALREADY_LOGGED_IN stops recursion from the logging in.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hello,
I want to use a shell-script to transfer data over sftp.
I donīt find a way to login in automatically.
I tried to send the password in a script like possible with
ftp
sftp user@server << cmd
password
cd /distant/directory
lcd /local/directoryget ssh_install
get ( or put) your... (2 Replies)
Discussion started by: olso
2 Replies
2. UNIX for Advanced & Expert Users
In which case could be better don't use a passphrase creating an authentication key for ssh comunications?
Thanks in advance. (1 Reply)
Discussion started by: Minguccio75
1 Replies
3. Shell Programming and Scripting
Below is a part of my shell script. Currently I have shared the public key of the client with the host, therefore I will not be prompted for the password.
The key that has been created on the client is also without a passphrase. If it is created with a passphrase, the code I have will not... (3 Replies)
Discussion started by: farahzaiba
3 Replies
4. Solaris
Hi Gurus
I have a few Sol 5.9 servers and i have enabled password less authentication between them for my user ID. Often i have found that when my password has expired,the login fails.
Resetting my password reenables the keys.
Do i need to do something to avoid this scenario or is this... (2 Replies)
Discussion started by: Renjesh
2 Replies
5. UNIX for Advanced & Expert Users
We have a number of linux clusters running Oracle. The clusters require that all member nodes have promptless/passwordless login through ssh (ie. the keys were created with null passphrases). We also have a management server that is not a member of any cluster but routinely connects to nodes of all... (3 Replies)
Discussion started by: Squeakygoose
3 Replies
6. UNIX for Advanced & Expert Users
Hi All,
We have a special requirement from our client, we need to automate one of the sftp job with password authentication. I know sftp can be automated with Key authentication, but this is not what I am looking for.
Can some body help me, a method like .netrc in FTP automation or like sftp... (6 Replies)
Discussion started by: shihabvk
6 Replies
7. OS X (Apple)
ssh passphrase permissions issues
I will try to be as thorough as possible, but keep in mind I am a designer, not a programmer... I do have linux mdadm experience and am reasonably comfortable behind the terminal, but I may need things to be spelled out for me. I am using 2 new-ish Macs with... (1 Reply)
Discussion started by: Ahab the Eskimo
1 Replies
8. Solaris
Hi Folks,
I have setup a passwordless connection from my Linux ( source) machine toSolaris ( destination ) machine. I have added passphrase while creating the rsa key. Now problem is each time when i make a connection i have to give the passphrase to make connection. How to override this ?
I... (4 Replies)
Discussion started by: chidori
4 Replies
9. Shell Programming and Scripting
I would like to write a bash shell script which will connect to remote server using passphrase. (I have public-private infrastructure created, and as per instruction, I must not use password less ssh).
This particular script will be fired from cron.
Can you please advice how I can supply the... (2 Replies)
Discussion started by: atanubanerji
2 Replies
10. Red Hat
Hello Experts,
when I am trying to connect my target server through sftp after creating ssh password less setup, it is asking for passowrd to connect.
to setup this I followed below process:
-->generated keys by executing the command "ssh-keygen -t rsa"
-->this created my .ssh directory... (9 Replies)
Discussion started by: Devipriya Ch
9 Replies
LEARN ABOUT REDHAT
create_user
CREATE
USER(7) SQL Commands CREATE USER(7)
NAME
CREATE USER - define a new database user account
SYNOPSIS
CREATE USER username [ [ WITH ] option [ ... ] ]
where option can be:
SYSID uid
| [ ENCRYPTED | UNENCRYPTED ] PASSWORD 'password'
| CREATEDB | NOCREATEDB
| CREATEUSER | NOCREATEUSER
| IN GROUP groupname [, ...]
| VALID UNTIL 'abstime'
DESCRIPTION
CREATE USER will add a new user to an instance of PostgreSQL. Refer to the Administrator's Guide for information about managing users and
authentication. You must be a database superuser to use this command.
PARAMETERS
username
The name of the user.
uid The SYSID clause can be used to choose the PostgreSQL user ID of the user that is being created. It is not at all necessary that
those match the Unix user IDs, but some people choose to keep the numbers the same.
If this is not specified, the highest assigned user ID plus one (with a minimum of 100) will be used as default.
password
Sets the user's password. If you do not plan to use password authentication you can omit this option, but the user won't be able to
connect to a password-authenticated server. The password can be set or changed later, using ALTER USER [alter_user(7)].
ENCRYPTED
UNENCRYPTED
These keywords control whether the password is stored encrypted in pg_shadow. (If neither is specified, the default behavior is
determined by the PASSWORD_ENCRYPTION server parameter.) If the presented string is already in MD5-encrypted format, then it is
stored as-is, regardless of whether ENCRYPTED or UNENCRYPTED is specified. This allows reloading of encrypted passwords during
dump/restore.
See the chapter on client authentication in the Administrator's Guide for details on how to set up authentication mechanisms. Note
that older clients may lack support for the MD5 authentication mechanism that is needed to work with passwords that are stored
encrypted.
CREATEDB
NOCREATEDB
These clauses define a user's ability to create databases. If CREATEDB is specified, the user being defined will be allowed to cre-
ate his own databases. Using NOCREATEDB will deny a user the ability to create databases. If this clause is omitted, NOCREATEDB is
used by default.
CREATEUSER
NOCREATEUSER
These clauses determine whether a user will be permitted to create new users himself. This option will also make the user a supe-
ruser who can override all access restrictions. Omitting this clause will set the user's value of this attribute to be NOCREA-
TEUSER.
groupname
A name of a group into which to insert the user as a new member. Multiple group names may be listed.
abstime
The VALID UNTIL clause sets an absolute time after which the user's password is no longer valid. If this clause is omitted the login
will be valid for all time.
DIAGNOSTICS
CREATE USER
Message returned if the command completes successfully.
NOTES
Use ALTER USER [alter_user(7)] to change the attributes of a user, and DROP USER [drop_user(7)] to remove a user. Use ALTER GROUP
[alter_group(l)] to add the user to groups or remove the user from groups. PostgreSQL includes a program createuser [createuser(1)] that
has the same functionality as this command (in fact, it calls this command) but can be run from the command shell.
EXAMPLES
Create a user with no password:
CREATE USER jonathan;
Create a user with a password:
CREATE USER davide WITH PASSWORD 'jw8s0F4';
Create a user with a password, whose account is valid until the end of 2001. Note that after one second has ticked in 2002, the account is
not valid:
CREATE USER miriam WITH PASSWORD 'jw8s0F4' VALID UNTIL 'Jan 1 2002';
Create an account where the user can create databases:
CREATE USER manuel WITH PASSWORD 'jw8s0F4' CREATEDB;
COMPATIBILITY
The CREATE USER statement is a PostgreSQL extension. The SQL standard leaves the definition of users to the implementation.
SEE ALSO
ALTER USER [alter_user(7)], DROP USER [drop_user(l)], createuser(1)
SQL - Language Statements 2002-11-22 CREATE USER(7)