01-09-2009
A method which will usually work if you have a default TCP/IP setup with rlogin and remsh enabled. This approach is a security risk but less dangerous than holding a password in a script. All access will be logged. Don't do this with a root account.
See:
man inetd
man .rhosts
To give user user1 full access to user2.
Under user2 home directory create (or edit) the file called .rhosts with permissions 600 owned by user2.
In the .rhosts file put the line:
localhost user1
Then user1 can then rlogin to account user2:
rlogin localhost -l user2
Also user1 can run commands as user2 using remote shell (the command name for remote shell varies according to unix version):
remsh localhost -l user2 env
remsh localhost -l user2 -n "pwd;ls -la"
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
how can i change the superuser password?
the admin left the company, and we want to change the password.
to gain su access, i use:
# su -
password:***** (old password)
then, using passwd command it changes my own login password, not the root??
(this is not trying to block anybody's... (4 Replies)
Discussion started by: apalex
4 Replies
2. UNIX for Dummies Questions & Answers
My first post:
in /etc/rc2.d i have a startup script: Script1.
if you run #>scirpt1 stop/start from any user other than root you will get u must be supper user to run this script. eventhough the rights are 777.
Question: how can i get my user_a be able to run this script to stop and start it... (2 Replies)
Discussion started by: bcheaib
2 Replies
3. SCO
Can i change the password on the SCO GUI interface login page and if so how?
When I try to login it just goes right back to the login screen. If anyone has any suggestions, please reply. :confused: (3 Replies)
Discussion started by: qphillips
3 Replies
4. UNIX for Dummies Questions & Answers
Can I create a superuser account in scoadmin? If not how do I do it via command line (0 Replies)
Discussion started by: maconte
0 Replies
5. UNIX for Dummies Questions & Answers
Hi-
I'm trying to access my remote server via my bash shell (mac os x), but have forgotten my SSH pswd.
How can I reset my pswd?
Thanks for any leads... (1 Reply)
Discussion started by: newmacdev
1 Replies
6. UNIX for Dummies Questions & Answers
Strange one this...
One of our contacts switched FTP servers, a different IP and now using port 2121 instead of 21.
Changed the details in a Windows application using the username & password provided and it works no problem.
Tried to FTP through Unix and although I can connect to the... (2 Replies)
Discussion started by: macca74
2 Replies
7. Solaris
Hi!
Can someone please tell me how to log-in to Solaris as a superuser or as a root?
I have tried using "root" as a username, and my superuser password i had set in the terminal for the log-in password but it says "Roles can only be assumed by authorized users". "Permission denied."
I'm... (1 Reply)
Discussion started by: CarlosP
1 Replies
8. UNIX for Dummies Questions & Answers
Hello!
I found this on net:
This is the ``prompt''. If you entered you username, or your password incorrectly, you will be greeted by:
Login incorrect
localhost login: Don't panic, try again. Likely you either mis-typed either your login name, or your password. Try again. You're not... (2 Replies)
Discussion started by: pinklemon
2 Replies
9. Solaris
I have just installed Solaris 11. When I turn the computer on I don't want to see a login in screen. I want to automatically be logged in as "SUPERUSER".
My research tells me someone is going to tell me that's not wise or safe. I'm not interested in security advice. If someone I know is... (10 Replies)
Discussion started by: kkeevv
10 Replies
LEARN ABOUT OPENDARWIN
chsh
CHSH(1) User Commands CHSH(1)
NAME
chsh - change login shell
SYNOPSIS
chsh [options] [LOGIN]
DESCRIPTION
The chsh command changes the user login shell. This determines the name of the user's initial login command. A normal user may only change
the login shell for her own account; the superuser may change the login shell for any account.
OPTIONS
The options which apply to the chsh command are:
-h, --help
Display help message and exit.
-R, --root CHROOT_DIR
Apply changes in the CHROOT_DIR directory and use the configuration files from the CHROOT_DIR directory.
-s, --shell SHELL
The name of the user's new login shell. Setting this field to blank causes the system to select the default login shell.
If the -s option is not selected, chsh operates in an interactive fashion, prompting the user with the current login shell. Enter the new
value to change the shell, or leave the line blank to use the current one. The current shell is displayed between a pair of [ ] marks.
NOTE
The only restriction placed on the login shell is that the command name must be listed in /etc/shells, unless the invoker is the superuser,
and then any value may be added. An account with a restricted login shell may not change her login shell. For this reason, placing /bin/rsh
in /etc/shells is discouraged since accidentally changing to a restricted shell would prevent the user from ever changing her login shell
back to its original value.
FILES
/etc/passwd
User account information.
/etc/shells
List of valid login shells.
/etc/login.defs
Shadow password suite configuration.
SEE ALSO
chfn(1), login.defs(5), passwd(5).
shadow-utils 4.5 01/25/2018 CHSH(1)