Change user from SH TO CSH

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Change user from SH TO CSH
# 1  
Old 10-06-2010
Change user from SH TO CSH

Dear Experts,

I'm currently working on a Red Hat Linux env. I have been working in AIX. My user is set to use SH default so when it logs in, we have to manually csh to do few things. I know you can change this in AIX using smitty tool. is there any similar too in LINUX that can change it?

Thanks,
# 2  
Old 10-06-2010
Code:
usermod -s /bin/csh username

# 3  
Old 10-06-2010
Hi.

usermod is in /usr/sbin, which suggests it's not for general use.

With Red Hat, as with AIX, you can use chsh

Code:
/home/oracle > getent passwd oracle
oracle:x:501:501::/home/oracle:/bin/ksh

/home/oracle > chsh
Changing shell for oracle.
Password: 

New shell [/bin/ksh]: /bin/csh
Shell changed.

/home/oracle > getent passwd oracle
oracle:x:501:501::/home/oracle:/bin/csh

# 4  
Old 10-06-2010
So If i Understand correctly, I can use the following command to change it permanantly.

- usermod -s /bin/csh username
or
- usermod -s /bin/ksh username

So after using this command, it will be kept csh or ksh for good.
# 5  
Old 10-06-2010
Can you run it?

Code:
/usr/sbin > ls -l /usr/sbin/usermod
-rwxr-x--- 1 root root 74448 Mar  3  2009 /usr/sbin/usermod

# 6  
Old 10-06-2010
I will be testing soon and update you. Thanks,
# 7  
Old 10-07-2010
I think scottn means: you can add chsh /bin/csh to your .profile if you don't have root priv.
This User Gave Thanks to jim mcnamara For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Change user

Hi All, need your assistance, how can i change user again after i change my user. here is the code that i tried su - myuser #success su - webuser ##what i want to try is to change user again to webuser from myuser account my output is it cannot change to webuser account. only in... (8 Replies)
Discussion started by: meister29
8 Replies

2. Shell Programming and Scripting

Perl Csh - setenv ENV change environment variable

I have 3 programs, 1 in perl, 2 in csh: call them perl1, csh1 and run.ol I need perl1 to set csh1 variable NOLOG_qsub = "" I need perl1 to run, run.ol run.ol takes the executable and input and outputs to output run.ol#!/bin/csh -f # run.ol executable input output perl1 should... (1 Reply)
Discussion started by: austinj
1 Replies

3. AIX

How to change normal user id to LDAP user id?

If I create a new user id test: mkuser id=400 test then I want it to LDAP user: chuser -R LDAP SYSTEM=LDAP registry=LDAP test It shows: 3004-687 User "test" does not exist. How to do? (4 Replies)
Discussion started by: rainbow_bean
4 Replies

4. Solaris

how to change /export/home/user dir to /home /user in solaris

Hi all i am using solaris 10, i am creating user with useradd -d/home/user -m -s /bin/sh user user is created with in the following path /export/home/user (auto mount) i need the user to be created like this (/home as default home directory ) useradd -d /home/user -m -s /bin/sh... (2 Replies)
Discussion started by: kalyankalyan
2 Replies

5. Shell Programming and Scripting

Change user

Hi, I have to change many times user in a script. With the command su userName I receive the request for password. I need to open a session with another user I would put the password at the beginning. How can I do it? Thanks, bye bye. ---------- Post updated 22-04-10 at 10:58 AM ----------... (9 Replies)
Discussion started by: abdujaparov
9 Replies

6. UNIX for Dummies Questions & Answers

change user> to user@host> ssh prompt

Hi, I was wondering how to change the prompt for my ssh login. At the moment it is like user> while I'd like it to be as user@host> It is in the .bash_profile or .ssh ??? Thanks (2 Replies)
Discussion started by: pmasterkim
2 Replies

7. Shell Programming and Scripting

csh failing to call an 2 embedded csh script

I have an extraordinary problem with a csh script.....(feel free to berate the use of this but I'm modifying an existing bunch of them) Anyway, I have a master csh script which in turn calls a second csh script. This second csh script is below. Within this second script are two compiled C++... (1 Reply)
Discussion started by: pollsizer
1 Replies

8. 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

9. Forum Support Area for Unregistered Users & Account Problems

Change of user name

I am on several other Forums under the handle of FloridaBD and therefore would like to request that my user name here on Unix forums be changed from SunBurntYux to FloridaBSD Thanks. (1 Reply)
Discussion started by: SunBurntYux
1 Replies
Login or Register to Ask a Question