- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- /etc/passwd Startup-Program
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
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
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-05-2001 07:16 AM
тАО03-05-2001 07:16 AM
What is the syntax for the last field of the /etc/passwd (the Startup-Program) such that : it will execute a script e.g. /usr/local/file1.sh, & then specifiy that the User's startup shell is /usr/bin/csh ? The user should be shown the normal CDE Workspc after login.
Must "file1.sh" be a C-Shell script or can it be a POSIX shell script ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2001 07:30 AM
тАО03-05-2001 07:30 AM
Re: /etc/passwd Startup-Program
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2001 07:31 AM
тАО03-05-2001 07:31 AM
Re: /etc/passwd Startup-Program
Simply execute your script as the last line of your profile (.login) and leave /usr/bin/csh as the user's shell in /etc/passwd. The script you choose should have its shell interpreter specified in the heading, like:
#!usr/bin/sh #...for Posix...
Your script will run and when done, you will drop into the normal shell, in this case, your csh shell.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2001 11:13 PM
тАО03-05-2001 11:13 PM
Solutionmain() {
#include
(void) setuid((uid_t) 0);
execlp("file1.sh", "file1.sh", (char *)0
);
}
(if necessary use absolute path to file1.sh)
Jacques
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2001 11:38 PM
тАО03-05-2001 11:38 PM
Re: /etc/passwd Startup-Program
#!/usr/bin/csh
.
.
/usr/bin/csh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2001 10:59 AM
тАО03-06-2001 10:59 AM
Re: /etc/passwd Startup-Program
The startup file in /etc/passwd can be a script. I would use
exec /usr/bin/csh
as the last line, if you must execute the script first. As has been pointed out, though, it will probably be better to execute the script from the user's .login file.
If you replace /usr/bin/csh with another script in /etc/passwd, you may consider creating/updating /etc/shells or else the user may not be able to access his/her account via ftp.
--Bruce
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-07-2001 01:15 AM
тАО03-07-2001 01:15 AM