Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

shells(5) [linux man page]

SHELLS(5)						     Linux Programmer's Manual							 SHELLS(5)

NAME
shells - pathnames of valid login shells DESCRIPTION
/etc/shells is a text file which contains the full pathnames of valid login shells. This file is consulted by chsh(1) and available to be queried by other programs. Be aware that there are programs which consult this file to find out if a user is a normal user. E.g.: ftp daemons traditionally disallow access to users with shells not included in this file. FILES
/etc/shells EXAMPLE
/etc/shells may contain the following paths: /bin/sh /bin/csh SEE ALSO
chsh(1), getusershell(3) COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. 1993-11-21 SHELLS(5)

Check Out this Related Man Page

GETUSERSHELL(3) 					     Linux Programmer's Manual						   GETUSERSHELL(3)

NAME
getusershell, setusershell, endusershell - get permitted user shells SYNOPSIS
#include <unistd.h> char *getusershell(void); void setusershell(void); void endusershell(void); Feature Test Macro Requirements for glibc (see feature_test_macros(7)): getusershell(), setusershell(), endusershell(): _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500) DESCRIPTION
The getusershell() function returns the next line from the file /etc/shells, opening the file if necessary. The line should contain the pathname of a valid user shell. If /etc/shells does not exist or is unreadable, getusershell() behaves as if /bin/sh and /bin/csh were listed in the file. The setusershell() function rewinds /etc/shells. The endusershell() function closes /etc/shells. RETURN VALUE
The getusershell() function returns a NULL pointer on end-of-file. FILES
/etc/shells CONFORMING TO
4.3BSD. SEE ALSO
shells(5) COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. GNU
2007-07-26 GETUSERSHELL(3)
Man Page

15 More Discussions You Might Find Interesting

1. New to Unix. Which books should I read?

Unix Books

I'm just looking for really good unix book on programming in all shells, and system adminstrator books, and well as just all around really good books on unix. I know the "Unix Shell Programming" book that Neo recommends I recently purchased that it is very good. But when I heard that Neo has... (13 Replies)
Discussion started by: Astudent
13 Replies

2. Shell Programming and Scripting

Another shellscript question

Folks; on a unix server I have a mapping file which holds a list mountpoints of all databases and their mountpoints. tab delimited or colon deliminted..I needed to copy the datafiles from the pristine mountpoints to test's mountpoints in this case. I needed to do this by passing sid name using... (18 Replies)
Discussion started by: jigarlakhani
18 Replies

3. Shell Programming and Scripting

Shellscript to Sudo other account

Hi, I have to write a shell script to sudo other account. Foreg, i am working in account ramdev1, i have a sudo access where through shell script i need to sudo another account ramdev2 and read a file "ram.inc" get those data and save it in a .txt file and return it? Since i am new to... (21 Replies)
Discussion started by: sachin.tendulka
21 Replies

4. Shell Programming and Scripting

Shellscript to rearrange filenames in directories

below is the script to rename filenames ending with .pdf extension. I want the script to enter directories and search for all pdf and then if it is in the format file_amb_2008.pdf , then change it to 2008_amb_file.pdf, and this script should work only for .pdf files. help required to make the... (12 Replies)
Discussion started by: deaddevil
12 Replies

5. Shell Programming and Scripting

Shellscript to sort duplicate files listed in a text file

I have many pdf's scattered across 4 machines. There is 1 location where I have other Pdf's maintained. But the issues it the 4 machines may have duplicate pdf's among themselves, but I want just 1 copy of each so that they can be transfered to that 1 location. What I have thought is: 1) I have... (11 Replies)
Discussion started by: deaddevil
11 Replies

6. Shell Programming and Scripting

Generating XMLfile using shellscript

I have a text file in the following form and i want to store it in 2-d array. After that i have to generate a XMLfile using the elements of array. Please tell me :how store this file in the form of 2-d array and then howto generate XML file using that array...all coding has to be done in bash... (14 Replies)
Discussion started by: cynosure2009
14 Replies

7. Shell Programming and Scripting

Switching between shells

I don't know why, but it just isn't working how I want it to work. You might want to run it to see what I mean. Or you might be a genius (or just really good at unix) and know just by looking at it what the problem is. Have fun trying to figure this one out.:wall: (11 Replies)
Discussion started by: nowruzr
11 Replies

8. Shell Programming and Scripting

Create an .csv/excel file using shellscript

In my file, i have 4 Product names(For ex:Microsoft excel, Oracle,.Net,IBM websphere,..etc.,) I want this 4 Products in 4 individual .csv/excel file after running the script with those products related information. (12 Replies)
Discussion started by: Navya
12 Replies

9. Shell Programming and Scripting

Automation of UI using shellscript

Hi, I want to do automation on UI using shellscript. eg: 1) Drop down menu contains assign , investigate, closed. now there is one id want assign it using assign tab then need to investigate it and lastly close. Sometimes the id can't assign to perticular user. there are so many... (11 Replies)
Discussion started by: aish11
11 Replies

10. Shell Programming and Scripting

mysql query in shellscript

Hi, I want to run below query on shellscript but having one problm. ADV=$( mysql -h "$IP_ADDR" -u "$USER_NAME" "$TABLE_NAME" -BNe" SELECT ADV FROM indata where inid='$INSTRUID' and Date='$latest Date';" ) here Date column contans different below dates 2011-12-01... (11 Replies)
Discussion started by: aish11
11 Replies

11. Shell Programming and Scripting

Extract TAG name and XPATH from XML file via shellscript

Hi, Here is a sample xml file and expected output. I need to extract the element/tag name (not value) and xpath (sample output.txt). But the main problem is I put here one simple xml file where I can clearly see the number of elements, but in real time I have a xml file which have over 500... (18 Replies)
Discussion started by: BithunC
18 Replies

12. Shell Programming and Scripting

'*' not working in shellscript

Hi, To Archive files, I try to move files from one directory to another directory . So i used the below logic, #!/bin/ksh ****Archive***** mv ${DATA_DIR}/ABC_.dat ${ARCHIVE} So if i give the complete file name its working fine. But if i use '*', im getting the below error, mv:... (18 Replies)
Discussion started by: Bopty
18 Replies

13. Shell Programming and Scripting

[Solved] Simple Shellscript for uploading files to a specific folder on a ftp-server?

hi! Iam using my D-link DNS-320 (NAS) with fun_plug installed (a unix client) I am currently using cron to run a shellscript running a java-application that creates a couple of txt files. These files needs to be uploaded to a specific folder on my webhosts ftp server-account. I need a... (16 Replies)
Discussion started by: Nigge
16 Replies

14. Shell Programming and Scripting

Logic to separate the first name in the file

Hi any logic to write a shell script to go back up into the previous directory and it has "n" number of files like abc-1.0.1.rpm , xyz-3.2.1.rpm , a-bd-2.3.1.rpm etc.. with same pattern. I need the first name of it before the numeric starts (which can acts as a delimiter) i.e(-1.0.1) Kindly... (15 Replies)
Discussion started by: ricky-row
15 Replies

15. Shell Programming and Scripting

Version checking

Hi everyone, I have binary file that call “app”, this file must be bind with “config file” to run. problem is I have 10 different version of “app”, in different path with different “config file”! This command show version of “app”: root ~: /home/user1/app -version 2.7 The only way... (30 Replies)
Discussion started by: indeed_1
30 Replies