- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Change the shell of some user ???
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2011 10:00 PM
06-27-2011 10:00 PM
Hi Team,
i create user "ilink" with this home directory /comptel/ilink, i want this user go to other path "/usr/local/bin/bash" when i login with it without changing the home directory.
How i can do it that ?
Thanks
Solved! Go to Solution.
- Tags:
- chsh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2011 10:21 PM
06-27-2011 10:21 PM
Re: Change the login path of some user ???
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2011 11:06 PM
06-27-2011 11:06 PM
Re: Change the login path of some user ???
Hi,
i want to change the user shell permanently to bash shell /usr/local/bin/bash for ilink user only
i try to change user shell from /sbin/sh to bash in HP ux 11.31 bash location is /usr/local/bin/bash
i used smh but this shel is not available on the list
How i can do it that ??
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2011 11:19 PM
06-27-2011 11:19 PM
Re: Change the shell of some user ???
>I want to change the user shell permanently to bash shell /usr/local/bin/bash for ilink user only
You or that user can use chsh(1).
You may have to put that shell in /etc/shells.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2011 11:50 PM
06-27-2011 11:50 PM
Re: Change the shell of some user ???
Adjust the /etc/passwd file.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2011 01:35 AM
06-28-2011 01:35 AM
Solutionmore /etc/shells
/etc/shells: No such file or directory
but i edit the /comptel/ilink/.profile and i add this lines
=========
. sas/.profile
/usr/local/bin/bash
stty erase "^?" kill "^U" intr "^C" eof "^D"
=========
And how to assign point on this new forums ?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2011 02:11 AM
06-28-2011 02:11 AM
Re: Change the shell of some user ???
>/etc/shells: No such file or directory
You need to create this file and add the default shell and your new one. See shells(4) and getusershell(3C).
>And how to assign point on this new forums ?
Click on the kudos star next to the replies.
http://h30499.www3.hp.com/t5/Tips-and-Tricks/Kudos-what-where-how-and-why/m-p/4803621
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2011 03:25 AM
06-28-2011 03:25 AM
Re: Change the login path of some user ???
I believe the only thing to remember during a bash shell profile assignment , restrict yourself to give bash profile a superuser like root.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2011 07:04 AM - edited 06-28-2011 07:09 AM
06-28-2011 07:04 AM - edited 06-28-2011 07:09 AM
Re: Change the shell of some user ???
> ...added to profile...
> . sas/.profile
> /usr/local/bin/bash
> stty erase "^?" kill "^U" intr "^C" eof "^D"
This is not a good way to change shells. The command chsh as mentioned above is designed to do exactly what you want and does not require root privileges. In the example above, the current shell will start a sub shell and the stty commands will only be run AFTER you exit from bash. Just remove the bash line and run this command:
chsh myuser /usr/local/bin/bash
From now on, myuser will login and be given bash as their shell.
Note that /etc/shells does not normally exist. You create this file when you start using non-standard shells. The starting point for this file is found in the man page for getusershell, but you can just copy-paste this list and add /usr/local/bin/bash to the end:
/sbin/sh
/bin/sh
/bin/ksh
/bin/false
/usr/bin/sh
/usr/bin/rsh
/usr/bin/ksh
/usr/bin/rksh
/usr/bin/csh
/usr/bin/rcsh
/usr/bin/keysh
Bill Hassell, sysadmin