LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices



Reply
 
Search this Thread
Old 04-03-2006, 03:20 PM   #1
sosborne
LQ Newbie
 
Registered: Apr 2006
Posts: 23

Rep: Reputation: 15
Problem initializing BASH Shell after install


I installed the bash shell on my AIX and changed the /etc/shells list. However, when I go to change my shell, I can't get it to list /bin/bash or /usr/bin/bash as an option. I can type 'bash' at the ksh prompt to get the bash shell, and it works just fine.

I've never had to change a shell before on any *nix systems. How do I get the passwd -s to recognize the updated /etc/shells?

Thanks in advance

Last edited by sosborne; 04-03-2006 at 03:25 PM.
 
Old 04-03-2006, 04:20 PM   #2
Dazed_75
Member
 
Registered: Oct 2005
Location: Arizona
Distribution: Debian, Ubuntu, Puppy, others
Posts: 36

Rep: Reputation: 16
I do not know about your distribution, but I am using Ubuntu 5.10 and passwd -s only shows my current shell, not the list of many shown in /etc/shells. It requires me to type in the name of the desired shell. Same is true for chsh which is apparently what password -s invokes. The info description for neither says it displays a list of valid shells. The info for chsh DOES say that whatever you enter is validated against /etc/shells.

Now maybe your distro has a different chsh or passwd implementation that lists the possible shells or maybe I mis-understood your question. BTW, I hope you were not entering passwd -s /bin/bash as the syntax is for a user name if you are a super user changing the shell for some other user by doing passwd -s michael for example.
 
Old 04-04-2006, 12:17 PM   #3
sosborne
LQ Newbie
 
Registered: Apr 2006
Posts: 23

Original Poster
Rep: Reputation: 15
Found a work-around, but not a solution

Thanks for the reply =). I'm running AIX 5.2.

Initially, AIX 5.2 was limited to ksh, rsh, csh & bsh; however, I am quite used to the bash shell, so I installed it from IBM's repository.

I've never not had bash as a choice, so, trying to get it to be recognized by either passwd -s or chsh has been difficult. At the prompt, I try to type in /bin/bash or /usr/bin/bash, and I get an error message.

My work-around, in the ~/.profile:

.
.
.
clear
bash

The problem with this work-around is that bash is not the login shell, so, to logout, I have to exit a couple times. While this isn't really a problem, I do want to find the correct way to call bash up and have it be my login shell.
 
Old 04-05-2006, 08:51 AM   #4
AbrahamJose
Member
 
Registered: Feb 2006
Location: India
Posts: 165

Rep: Reputation: 30
Post modify etc/passwd

In my AIX 4.3 or 5.2 I can't change shell by using passwd -s (even for toot)
When I try, it says login shell not changed.

To change login shell
modify the file /etc/passwd
The last field for each loggable ids, it will be the login shell
Change it to ur desired shell.
Eg:
If the line is as
user1:!:.........:/bin/ksh
change /bin/ksh by ur desired shell
WARN!! If u are doing it for a super user, Plz be sure that one more super user exists, or BE SURE ABOUT THE SHELLs FULL PATH)

Note:
echo $SHELL or env|grep SHELL will display ur login shell,even if u have changed ur shell after login.
 
Old 04-13-2006, 08:40 AM   #5
looseCannon
Member
 
Registered: Dec 2003
Location: Little Rock, AR
Distribution: Fedora Core 2, AIX, HP-UX, Solaris, Whitebox
Posts: 193

Rep: Reputation: 31
Quote:
Originally Posted by sosborne
I installed the bash shell on my AIX and changed the /etc/shells list. However, when I go to change my shell, I can't get it to list /bin/bash or /usr/bin/bash as an option. I can type 'bash' at the ksh prompt to get the bash shell, and it works just fine.

I've never had to change a shell before on any *nix systems. How do I get the passwd -s to recognize the updated /etc/shells?

Thanks in advance

Edit /etc/security/login.cfg. Add /usr/bin/bash to the list of shells in the SHELL variable.

/etc/shells isn't referenced for the list of allowed shells, only the list in /etc/security/login.cfg is used.
 
Old 04-16-2006, 03:21 PM   #6
microsoft/linux
Senior Member
 
Registered: May 2004
Location: Sebec, ME, USA
Distribution: Debian Etch, Windows XP Home, FreeBSD
Posts: 1,445
Blog Entries: 9

Rep: Reputation: 45
Dazed_75, do you have linux running on an IBM 44p? Can you help me? see here
 
Old 04-17-2006, 01:29 PM   #7
sosborne
LQ Newbie
 
Registered: Apr 2006
Posts: 23

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by looseCannon
Edit /etc/security/login.cfg. Add /usr/bin/bash to the list of shells in the SHELL variable.

/etc/shells isn't referenced for the list of allowed shells, only the list in /etc/security/login.cfg is used.
Awesome!

That fixed it, thank you!
 
Old 05-24-2006, 11:27 PM   #8
einfeldt
LQ Newbie
 
Registered: Aug 2003
Location: San Francisco
Distribution: SuSE Pro 9.2; Linspire 4.5
Posts: 5

Rep: Reputation: 0
Hi,

There is a common problem under Mepis with adding new users, and it can produce the problems that you folks are talking about here. In short, the problem is that you might not have unchecked the box to disable the new account; or you might not have chosen a login shell. Please go to this link for a detailed newbie account of how to get your new user account working:

http://www.mepislovers.org/modules/n...orumpost111204


That link has screen shots. Here is a detailed set of step-by-step instructions for newbies:

This tip assumes that you are using KDE with Mepis. (I'm sorry, I don't know if GNOME is available with Mepis).

1) Click on the Kgear. For those of you who are Windows users moving to Mepis for the first time, the Kgear is in the lower left hand corner, where the Start button is in Windows.

2) Click System > Kuser.

3) You will be asked to type in your root user password. Please do so.

4) You will get a dialogue box called "KDE User Manager" or something like it. A screen shot of that dialogue box is attached as the first image below.

5) In the upper right hand corner, you will see a button called "Add User" or something similar. Click on it. You will get a dialogue box that asks you for the name of your user. Please type it and click okay. (I recommend that you type a simple name without dashes or spaces and in lower case. For now, just choose your first name. )

6) You will be taken to a dialogue box that looks like the second image attached below. Look for the field called "full name". Please type your full name here. Do not hit the OK button until I tell you to do so, because you are not done yet.

7) Look for the words "Login Shell". Beside those words is a field with the word "<Empty>" written just like that, except without the "quotes". Beside the word "<Empty>" is a little arrow pointing down. Click on it. You will see that you are given choices. Please click on /bin/bash . You are still not ready to click the OK button.

8) Now look down about four fields or so for the words "Account disabled." The box beside it should be checked. You MUST uncheck it, or you will not be able to use your user account. You are still not ready to click the OK button.

9) Now look for the Groups tab. It is at the top right hand side of the KDE User Manager dialogue box. Click on the Groups tab. You will see that there are a series of empty boxes with words beside them. Those words represent the groups to which your new user will belong. You must belong to a certain group to have its powers. For example, to have the power to hear audio, you must click the box beside audio. Be careful in choosing the powers that you give this user!! If you choose adm and root, you will give the user the right to make fundamental changes to your computer, including the power to destroy the data on the hard drive!!

10) After you have selected your groups for this user, you are done. You can now click the OK button. When you log out of the user that you were previously working under, you will see that your new user's account name in the log in menu. Click on that user's name, and type that user's password. You are good to go!

Christian Einfeldt

einfeldt at g mail dot com
 
Old 05-27-2006, 10:26 AM   #9
Michael AM
Member
 
Registered: May 2006
Distribution: AIX 5.3, AIX 6.1, AIX 7.1
Posts: 95

Rep: Reputation: 23
I didnt read your screen shots, but on AIX, before an account can be used an administrive password must be set.

The preferred command is 'pwdadm'. However, as root you may also use the 'passwd' command. One of things this does is change the 'password field' in /etc/passwd to '!'. This tells 'login' that there is a vaild password entry in /etc/security/passwd (the shadow password file).

Note that as this is an admin change, the user must immediately change his password. Some programs have trouble with this part of the 'login' process.

the easy check is to verify that the password field in /etc/passwd is '!' and nothing else.
 
  


Reply

Tags
passwd, password


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bash shell script problem sorno Programming 1 07-30-2005 06:02 AM
bash shell 'find' problem. ayiiq180 Linux - Software 1 04-03-2005 12:51 PM
Rare problem - cant login into bash shell Xris718 Linux - General 2 07-16-2004 02:07 AM
bash shell script problem shanenin Linux - Software 5 02-09-2004 10:22 PM
bash shell script problem evilchild Programming 7 02-08-2004 11:09 PM


All times are GMT -5. The time now is 05:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration