The /etc/shells file is missing.


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers The /etc/shells file is missing.
# 8  
Old 08-24-2011
Thanks yazu!! I did this:-
Code:
for SHELL in /bin/bash /bin/jsh /bin/pfcsh /bin/pfsh /bin/tcsh /sbin/jsh /usr/bin/csh /usr/bin/ksh /usr/bin/pfksh /usr/bin/sh /usr/bin/zsh /usr/xpg4/bin/sh /bin/csh /bin/ksh /bin/pfksh /bin/sh /bin/zsh /sbin/pfsh /usr/bin/bash /usr/bin/pfcsh /usr/bin/pfsh /usr/bin/tcsh /usr/sfw/bin/zsh; do
    if [ -s $SHELL ]; then
        echo $SHELL exists!!
    fi;
done

# 9  
Old 08-24-2011
They may not always be in those locations, though. I'd check /etc/passwd to see what people are actually logging in as, too:

Code:
awk -F: '{ print $7 }' < /etc/passwd | sort -u | while read LINE
do
        BASE=`basename $LINE`
        case "$BASE" in
        ksh)  ;;
        csh)  ;;
        tcsh) ;;
        sh)   ;;
        bash) ;;
        zsh)   ;;
        *) continue ;; # Avoid things like /bin/nologin, /sbin/halt...
        esac
        echo "$LINE"
done

Which of course may not catch everything but may be a useful addition to the info you have.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Identify missing file

I am on linux and I am supposed to receive 3 files. If any of the files are not received I need to identify the missing file and throw it out in a variable. I have put in something like this if ] then echo "file $file1 was found" else echo "ERROR: file $file1 was not found!!!"... (8 Replies)
Discussion started by: dsravanam
8 Replies

2. Shell Programming and Scripting

Systemd errors of missing file “No such file or directory” inspite of file being present

The contents of my service file srvtemplate-data-i4-s1.conf is Description=test service for users After=network.target local-fs.target Type=forking RemainAfterExit=no PIDFile=/data/i4/srvt.pid LimitCORE=infinity EnvironmentFile=%I . . . WantedBy=multi-user.target (0 Replies)
Discussion started by: rupeshkp728
0 Replies

3. UNIX for Dummies Questions & Answers

File Extension Missing in file-$var.csv

I'm afraid this is a silly question but I can't figure it out. I have a script like so... echo "Enter DRDL Signature Version Number" read DRDL_Number mv signature_output.csv SERVICE_OBJECTS_S-$DRDL_Number.csv The resultant filename does not contain the .csv as follows.... (3 Replies)
Discussion started by: Cludgie
3 Replies

4. Shell Programming and Scripting

2 shells in one file

In the below code I am trying to combine two shell into one, but not sure if Im doing it right. Basically, there are 3 steps: Step 1: the file conversion (which is underlined and asks the user if the file needs to be converted, if "y", then it runs the perl script if "n" then it skips to line... (4 Replies)
Discussion started by: cmccabe
4 Replies

5. Red Hat

Yum - resolving missing dependencies that are not missing

I am trying to install VirtualBox on RHEL 5 but I need the 32 bit version for 32 bit Windows. When I run yum I get the following: sudo yum localinstall /auto/spvtg-it/spvss-migration/Software/VirtualBox-4.3-4.3.2_90405_el6-1.i686.rpm Loaded plugins: fastestmirror Setting up Local Package... (13 Replies)
Discussion started by: gw1500se
13 Replies

6. SuSE

How to resolve missing missing dependencies with opensuse 11.3 and 12.3?

Hello, This is a programming question as well as a suse question, so let me know if you think I should post this in programming. I have an application that I compiled under opensuse 12.2 using g77-3.3/g++3.3. The program compiles and runs just fine. I gave the application to a colleague who... (2 Replies)
Discussion started by: LMHmedchem
2 Replies

7. Red Hat

File is missing after logrotate!!

I am having a requirement to rotate the my application logs dailay as it is keep on writiing to single file and below is the logrotate function which I am using, cat /apps/bmc/bmtm/QPasa_logrotate.conf /apps/bmc/bmtm/all_events.log /apps/bmc/bmtm/history_association.log { missingok ... (1 Reply)
Discussion started by: sandyrajh
1 Replies

8. Linux

Desktop file missing

I was using Fedora 9 with Gnome Desktop environment. I forgot my root password so I tried to recover the root's password by single user login at bootloader. I am able to login now. But some folders on my desktop are missing. So is there any mean by which I can recover my files on folder? (2 Replies)
Discussion started by: nixhead
2 Replies

9. Shell Programming and Scripting

need to print the missing lines in 1 file from 1 file via script

Hi, I am writting a script which will take all the files present in 2 directories. (the 2 directories have the same files with same name but some different content) i need 2 compare 2 files and then copy the contents of file1 to file2. the contents which are missing in file1 and nothing from... (8 Replies)
Discussion started by: dazdseg
8 Replies

10. Linux

missing passwd file

Hi Guys, I wonder how I can login into a linux system without having the passwd file. I was testing a script that unfortunately renamed my passwd file so now everytime I try to login on that system because it can't identify what shell to use basically it doesn't let me login. Any ideas.... (4 Replies)
Discussion started by: hariza
4 Replies
Login or Register to Ask a Question