Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to change Default Shell for any user? Post 302402504 by lalit21984 on Wednesday 10th of March 2010 04:11:10 AM
Old 03-10-2010
Java How to change Default Shell for any user?

Hi,
I am new for solaris...
how can we change default shell for any user and how to check that which shall currently we are in......
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

change user in a shell

Hi, is it possible to chnage the user in a shell script? i would like to create a script with should make some actions on the host which needs root permissions. i want do give the user which should start the script the root permissions. so is it possible to make a command in the script... (2 Replies)
Discussion started by: scottl
2 Replies

2. Shell Programming and Scripting

How can I change my default shell

hi ; Right now my default shell on our school system is : /bin/ksh but i want to change it to another shell. There is also bash shell installed in the system as : /bin/bash So, how can I change my default shell to bash shell? Or maybe any other shell? (17 Replies)
Discussion started by: milhan
17 Replies

3. UNIX for Dummies Questions & Answers

change user through shell script

hi, my problem is that i am calling a script from my perl program. the script checks wether a particular process is running or not if the process is not running then it should start the process. the problem here is that the front end logs into backend with a user which does not have the... (0 Replies)
Discussion started by: raviraushanjha
0 Replies

4. Shell Programming and Scripting

How do i change to super user then revert back to ordinary user ,using shell script?

Hi all, I am trying to eject the cdrom from a livecd after certain stage... Now assuming that it is possible to eject,please consider my issue!!! The OS boots into a regular user by default...so i am unable to use the eject command to push out the drive... However if i try pfexec eject it... (3 Replies)
Discussion started by: wrapster
3 Replies

5. Shell Programming and Scripting

Change default shell

Hi all I am a total newbie at anything to do with shells or any form of scripting Unix/Linux etc. I have been trying to run through a tutorial on scripting but it requires the use of sh. My FreeNAS(FreeBSD) test box running the latest nightly build as an embedded install on CF card has csh as... (14 Replies)
Discussion started by: npaisnel
14 Replies

6. Shell Programming and Scripting

Shell Script to change a user password using script

Hi Experts, I had tried to executes this script to change the user password through script: No lines in buffer #!/bin/ksh cat /etc/passwd | grep -v userid >> /tmp/pass.tmp1 cat /etc/passwd | grep userid >> /tmp/pass.tmp2 PASS1=`cat /tmp/pass.tmp2 | cut -d ":" -f2` PASS2=`q2w3e4r5` sed... (3 Replies)
Discussion started by: indrajit_renu
3 Replies

7. Solaris

Can't change default shell

Hello, I've changed the shell for user jack in /etc/passwd to ksh but when I log in it's still saying the shell is bash. Any help much appreciated (4 Replies)
Discussion started by: Grueben
4 Replies

8. UNIX for Dummies Questions & Answers

Change user passwords using shell script

Hi, I want to change the password of unix users on a number of servers.My plan was to ssh to all the servers in a shell script and use the passwd command. I tried to do so but everytime i run it i get this error. ssh -x -n -l user1 host passwd Changing password for "user1" 3004-709 Error... (3 Replies)
Discussion started by: poojabhat
3 Replies

9. Shell Programming and Scripting

Change default shell of a specific user with awk

I would like to replicate the functionality of chsh (or passwd -e) by awk. This is what I got so far, but I think there should be an easier way to search and replace field $7 only for lines beginning with user_name: awk -v user_name="$user_name" -v new_shell="$new_shell" -F: '$1 == user_name {... (2 Replies)
Discussion started by: nomad84
2 Replies

10. Shell Programming and Scripting

Change the default group of a user

Hi , for user test we have 3 groups. 1. test 2. dba 3. qa by default the group it test. How can I change the default group to dba? (5 Replies)
Discussion started by: Anupam_Halder
5 Replies
CPANPLUS::Shell::Default::Plugins::HOWTO(3perl) 	 Perl Programmers Reference Guide	   CPANPLUS::Shell::Default::Plugins::HOWTO(3perl)

NAME
CPANPLUS::Shell::Default::Plugins::HOWTO -- documentation on how to write your own plugins SYNOPSIS
package CPANPLUS::Shell::Default::Plugins::MyPlugin; ### return command => method mapping sub plugins { ( myplugin1 => 'mp1', myplugin2 => 'mp2' ) } ### method called when the command '/myplugin1' is issued sub mp1 { .... } ### method called when the command '/? myplugin1' is issued sub mp1_help { return "Help Text" } DESCRIPTION
This pod text explains how to write your own plugins for "CPANPLUS::Shell::Default". HOWTO
Registering Plugin Modules Plugins are detected by using "Module::Pluggable". Every module in the "CPANPLUS::Shell::Default::Plugins::*" namespace is considered a plugin, and is attempted to be loaded. Therefor, any plugin must be declared in that namespace, in a corresponding ".pm" file. Registering Plugin Commands To register any plugin commands, a list of key value pairs must be returned by a "plugins" method in your package. The keys are the commands you wish to register, the values are the methods in the plugin package you wish to have called when the command is issued. For example, a simple 'Hello, World!' plugin: package CPANPLUS::Shell::Default::Plugins::HW; sub plugins { return ( helloworld => 'hw' ) }; sub hw { print "Hello, world! " } When the user in the default shell now issues the "/helloworld" command, this command will be dispatched to the plugin, and its "hw" method will be called Registering Plugin Help To provide usage information for your plugin, the user of the default shell can type "/? PLUGIN_COMMAND". In that case, the function "PLUGIN_COMMAND_help" will be called in your plugin package. For example, extending the above example, when a user calls "/? helloworld", the function "hw_help" will be called, which might look like this: sub hw_help { " /helloworld # prints "Hello, world! " } If you dont provide a corresponding _help function to your commands, the default shell will handle it gracefully, but the user will be stuck without usage information on your commands, so it's considered undesirable to omit the help functions. Arguments to Plugin Commands Any plugin function will receive the following arguments when called, which are all positional: Classname -- The name of your plugin class Shell -- The CPANPLUS::Shell::Default object Backend -- The CPANPLUS::Backend object Command -- The command issued by the user Input -- The input string from the user Options -- A hashref of options provided by the user For example, the following command: /helloworld bob --nofoo --bar=2 joe Would yield the following arguments: sub hw { my $class = shift; # CPANPLUS::Shell::Default::Plugins::HW my $shell = shift; # CPANPLUS::Shell::Default object my $cb = shift; # CPANPLUS::Backend object my $cmd = shift; # 'helloworld' my $input = shift; # 'bob joe' my $opts = shift; # { foo => 0, bar => 2 } .... } BUG REPORTS
Please report bugs or other issues to <bug-cpanplus@rt.cpan.org<gt>. AUTHOR
This module by Jos Boumans <kane@cpan.org>. COPYRIGHT
The CPAN++ interface (of which this module is a part of) is copyright (c) 2001 - 2007, Jos Boumans <kane@cpan.org>. All rights reserved. This library is free software; you may redistribute and/or modify it under the same terms as Perl itself. SEE ALSO
CPANPLUS::Shell::Default, CPANPLUS::Shell, cpanp perl v5.14.2 2011-09-26 CPANPLUS::Shell::Default::Plugins::HOWTO(3perl)
All times are GMT -4. The time now is 07:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy