- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- useradd and default shell
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
Forums
Discussions
Discussions
Discussions
Forums
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
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
тАО03-22-2006 03:10 AM
тАО03-22-2006 03:10 AM
useradd and default shell
The manual page for useradd (1M) states that the shell can be set as a default, but then contradicts itself when it describes the parameters.
Mangling the /etc/default/useradd file also failed to have any effect.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2006 03:38 AM
тАО03-22-2006 03:38 AM
Re: useradd and default shell
'useradd -s /bin/ksh ...'
example snippet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2006 03:56 AM
тАО03-22-2006 03:56 AM
Re: useradd and default shell
What I want was a way to set the default shell that useradd uses when one isn't supplied on the command line.
It looks like useradd is set up to support it (like the RHEL version of useradd) but it doesn't work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2006 04:44 AM
тАО03-22-2006 04:44 AM
Re: useradd and default shell
Build a a wrapper script around the 'useradd' that sets the default shell argument to your choice and while passing the remaining arguments as is.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2006 04:57 AM
тАО03-22-2006 04:57 AM
Re: useradd and default shell
useradd -D does not have the -s available. It is this -D switch that sets the defaults in the /etc/default/useradd file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2006 05:08 AM
тАО03-22-2006 05:08 AM
Re: useradd and default shell
I suspect this is a weird bug on HP-UX, or they they never fully implemented the default saving. It's strange as it would be useful and not too difficult to implement. (I suppose it's the same reason why /sbin/sh is the default shell.)
I can't use a wrapper as it's an external program that creates the accounts, plus I never like altering any thing in a package (because as soon as you patch it all breaks).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2006 08:23 PM
тАО03-22-2006 08:23 PM
Re: useradd and default shell
a possbile workaround id to write a script to chnage the shell for the user just created by chsh command.
Just my .002$.
HTH,
Art
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2006 08:34 PM
тАО03-22-2006 08:34 PM
Re: useradd and default shell
useradd -D -s /usr/bin/ksh
Check it now.
useradd -D
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2006 08:42 PM
тАО03-22-2006 08:42 PM
Re: useradd and default shell
alias useradd='useradd -s /usr/bin/sh'
like that. When you execute useradd it will use /usr/bin/sh as shell type for that user.
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2006 09:27 PM
тАО03-22-2006 09:27 PM
Re: useradd and default shell
#default useradd options
HOMEDIR /home
GROUPID 20
INACT -1
EXPIRE
CHOWN_HOMEDIR no
SHELL /usr/bin/ksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-23-2006 01:55 AM
тАО03-23-2006 01:55 AM
Re: useradd and default shell
This may be an 11.11 or 11.20 feature only :-(