The /etc/shells file is missing.


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers The /etc/shells file is missing.
# 1  
Old 08-23-2011
The /etc/shells file is missing.

Hi the /etc/shells file is missing on some of development boxes. Is this ok? Where can I find this file?

---------- Post updated at 07:07 AM ---------- Previous update was at 07:07 AM ----------

I have solaris, linux, aix and hpux machines and on all of these machines the /etc/shells file is missing.
# 2  
Old 08-23-2011
Unless you plan to restrict shells using /etc/shells file, you can ignore the missing /etc/shells.

Solaris 10, hpux by default don't have the file.
# 3  
Old 08-23-2011
Thanks..! but I need to write script which needs to find the shells supported by the system. I just thought of doing cat /etc/shells, so if this is missing from where can i get the information.
# 4  
Old 08-23-2011
You may have to write a script to see what shells are on your system. Look at man getusershell.
Code:
http://compute.cnr.berkeley.edu/cgi-bin/man-cgi?getusershell+3

# 5  
Old 08-23-2011
Quote:
Originally Posted by dude2cool
You may have to write a script to see what shells are on your system. Look at man getusershell.
Code:
http://compute.cnr.berkeley.edu/cgi-bin/man-cgi?getusershell+3

getusershell is Solaris-specific. It is not portable and is a C function

Last edited by fpmurphy; 08-23-2011 at 10:10 AM..
# 6  
Old 08-24-2011
So is there any way we can do this, please let me know the approach I need to follow.
# 7  
Old 08-24-2011
You can prepare a list of known shells and check their availability. Something like this:
Code:
for sh in bash ksh93 ksh88 ksh sh dash zsh csh tcsh; do
  if which $sh >/dev/null; then
    echo "Find $sh"
  fi
done

This User Gave Thanks to yazu For This Post:
 
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