nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

chsh command - change user shell from a script

This is a discussion on chsh command - change user shell from a script within the Shell scripting forums, part of the Development/Scripting category; heyy hii guys i have a menu driven script where i have run my script using chsh by changing shell ...

Register free or login to your existing account and remove all advertisements.


Go Back   nixCraft Linux Forum > Development/Scripting > Shell scripting

Linux answers from nixCraft.


Shell scripting You can discuss the shell scripting, request shell scripts and scripting techniques

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-30-2009, 01:53 AM
Junior Member
User
 
Join Date: Mar 2009
OS: Debian
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
gsb1bee is on a distinguished road
Default chsh command - change user shell from a script

heyy hii guys i have a menu driven script where i have run my script using chsh by changing shell
wht i have done till now is ftp sol and put myscript which adds into my host.
and when i do telnet sol under root i have created a user and did chsh user and it asks me for New shell with full path:
Well how to write the full path name here so that i can run my script.

Any ideas much appreciated??
Reply With Quote
  #2 (permalink)  
Old 04-30-2009, 11:33 AM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Posts: 2,658
Thanks: 11
Thanked 237 Times in 177 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Use -s option:
Code:
chsh -s /path/to/shell
chsh -s /bin/bash
chsh -s /usr/local/bin/tcsh
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help

Last edited by nixcraft; 04-30-2009 at 11:36 AM.
Reply With Quote
Reply

Tags
bash , change shell , chsh , csh , ksh , shell scripting , tcsh


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
perl or shell script to change the password vivek rai Shell scripting 2 03-15-2009 11:51 PM
Linux Add User Shell Script abovenewbi Shell scripting 13 03-06-2009 03:57 AM
Solaris Change User Password Using a Shell Script vikas027 Solaris/OpenSolaris 1 06-14-2008 12:06 AM
How to change the login shell for Linux user chimu Getting started tutorials 0 01-26-2007 08:20 PM
Shell script to change folder directory owner after restore marinm Shell scripting 5 01-23-2007 01:53 PM


All times are GMT +5.5. The time now is 01:13 AM.


Powered by vBulletin® Version 3.8.4 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2009 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38