- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Script access control
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
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
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
02-08-2006 01:01 PM
02-08-2006 01:01 PM
Script access control
I am creating a script that will be used by help desk person to change password. I want that they can only type p for password change. if they type something else it will echo it and will be in the loop so the user donnot need to login again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2006 02:17 PM
02-08-2006 02:17 PM
Re: Script access control
getoption() {
echo "Enter p to change a user's password or press q to finish"
read OPTION
}
getoption
while [ $OPTION != "q" ]; do
case $OPTION in
p)
echo "Enter user name"
read USER
passwd $USER
;;
*)
echo $OPTION
;;
esac
getoption
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2006 02:24 PM
02-08-2006 02:24 PM
Re: Script access control
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2006 04:06 PM
02-08-2006 04:06 PM
Re: Script access control
# Avoid cancel of the script
stty dsusp undef eof undef eol undef eol2 undef discard undef \
status undef intr undef kill undef lnext undef quit undef reprint undef \
start undef stop undef susp undef werase undef
# Start the script
/usr/local/sbin/changepwd.sh
# Do not allow access to the shell
exit
So, the user won't have access to the shell. When the users logon, the script will start, when he press "q", the exit command will be run and will logout from the system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2006 05:22 PM
02-08-2006 05:22 PM
Re: Script access control
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2006 05:36 PM
02-08-2006 05:36 PM
Re: Script access control
nohup passwdscript
which will trap those signal's too.
--
Muthu