Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Can't login as SU anymore - SU: NO SHELL Post 302071560 by homechoice on Friday 21st of April 2006 03:33:12 PM
Old 04-21-2006
Error Can't login as SU anymore - SU: NO SHELL

the root shell has been changed in the file /etc/passwd, basically pointing to an incorrect directory. So now every time we login as 'su' I get the message
'su: no shell' so we can't login as superuser.

Is there an easy way to rectify this? please use step by step instructions/commands -

I know one way is to boot off a cd on the machine in single mode and then mount the root dir and then change the file...but I'm unsure about the command line. Is there any other way? I've tried linking the path, but permission rights stopped this.
 

9 More Discussions You Might Find Interesting

1. HP-UX

cannot login after changing login shell

Hello Everyone, I am a newbie in unix. I was practicing shell scripts on hp unix machine. I changed my current login shell (Korn) to Bourne shell giving the following command. $ chsh username /usr/bash I am using secure shell client for accessing the hp ux server. After which i... (4 Replies)
Discussion started by: hardesh
4 Replies

2. Linux

How to Start a Shell as Login shell instead of ordinary shell

Hi I tried with bash --login option. but the output is siva:~$ bash --login siva:~$ is there any way to make the shell ask for user id and password ( and login as different user instead of using sudo / su ) Thx in advance Siva (3 Replies)
Discussion started by: Sivaswami
3 Replies

3. UNIX for Dummies Questions & Answers

Can't SSH as root anymore!

I've screwed something up in my sshd_config apparently, because I can't ssh with root anymore. I had disabled root login for security reasons, but then my ssh credentials with full administrative privelges stopped working. So then I reenabled root login (and reset ssh), but root now isn't... (3 Replies)
Discussion started by: cquarry
3 Replies

4. UNIX for Dummies Questions & Answers

Input of char 's' is not possible anymore

Hello, I have a big problem and no idea how to solve it. I was looking up commands in /bin with 'man' as I found 'sh'. In mistake I started the command. Now after that I can not input the character 's' in shell anymore! Even after restarting system the problem is still there. Mysterious... (7 Replies)
Discussion started by: daWonderer
7 Replies

5. Windows & DOS: Issues & Discussions

Can't login to Vista anymore

hello obviously something got messed up and I can't login to my Vista account anymore. the password was automatically disabled hence it was directly booting into vista. then I installed openSSH and created a password for the user. But vista login doesn't recognize this password and now I can't... (6 Replies)
Discussion started by: milhan
6 Replies

6. Shell Programming and Scripting

Pause shell script till folder doesn't change size anymore

Hi, I recently would like to write a shell script that 1. Runs in the background (can be done with "&", but i'd be happy for other solutions to keep programs running) 2. Does its stuff 3 THEN checks a specified folder for a size change over time (say, each 5 seconds. AND ONLY continues with... (9 Replies)
Discussion started by: pasc
9 Replies

7. Slackware

Anyone Using Slackware Anymore?

We used to use Slackware, but then moved all our servers to Ubuntu Linux. Does anyone use Slackware anymore? (8 Replies)
Discussion started by: Neo
8 Replies

8. UNIX for Dummies Questions & Answers

Which of the following command displays your login shell in bash shell?

Options:: A)$shell B)echo $ bash C)echo $ O D)$ O (1 Reply)
Discussion started by: raghugowda
1 Replies

9. Shell Programming and Scripting

Script as login shell (passing args to login shell)

Hello all, for security reasons my compagny imposes that my script be launch remotly via ssh under the users login shell. So serverA launches the ssh command to serverB which has a local user with my script as a login shell. Local script works like a charm on his own. serverB$ grep... (20 Replies)
Discussion started by: maverick72
20 Replies
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)
All times are GMT -4. The time now is 06:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy