10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am trying to schedule a script that starts on reboot.I came across chkconfig utility to schedule scripts on reboot.
Problem here is can i how to use this chkconfig to schedule a script that runs a s normal user.
Or if there is any other function to schedule on reboot as normal user... (4 Replies)
Discussion started by: praveena kotapa
4 Replies
2. UNIX for Dummies Questions & Answers
Whenever i switch from root to another user, by doing su - user, it takes me to home directory of user. This is very annoying as i want to be in same dir to run different commands as root sometimes and sometimes as normal user.
How to fix this? (1 Reply)
Discussion started by: syncmaster
1 Replies
3. UNIX for Dummies Questions & Answers
Hi ,
I am trying to stop and start a process using the below code. I have sudo access on my machine
## PID = process id
echo "$PASSWD" | sudo -S kill -9 <PID>
echo "$PASSWD" | sudo -S /opt/abc/startserver
/opt/abc/startserver: error while loading shared libraries: librts.so: cannot open... (6 Replies)
Discussion started by: rakeshkumar
6 Replies
4. Solaris
:confused: I installed latest version of java ( jre 1.6) on Solaris Machine ......when I run java -version as root, shows the latest version but when I run java -version as normal user, shows the old / previous version
What should I do to fix this ...should show the latest version... (3 Replies)
Discussion started by: frintocf
3 Replies
5. Solaris
Hi All,
I am trying to uninstall jdk 1.5 from my Solaris 10 64 bit but some how was not successful.so tried to delete the folder of jdk from /usr but its throughing error as:
Unable to remove directory jdk: Read-only file system
Even I tried to create a dir in /usr but its not allowing me... (4 Replies)
Discussion started by: Pshah
4 Replies
6. Shell Programming and Scripting
Hi,
We need to execute a root commmand to change the expiry period of a user but we are getting error as permission denied
Q How can we execute a root command by a normal user ? :mad:
any thing or suggestion will be good .... :b: (3 Replies)
Discussion started by: abhishek1979
3 Replies
7. Shell Programming and Scripting
Hi All
I have written one shell script for GPRS route add is given below named GPRSRouteSet.sh
URL="www.google.com"
VBURL="10.5.2.211"
echo "Setting route for $URL for GPRS"
URL_Address=`nslookup $URL|grep Address:|grep -v "#"|awk -F " " '{print $2}'|head -1`
echo "Executing ... (3 Replies)
Discussion started by: mnmonu
3 Replies
8. Shell Programming and Scripting
Got a cron to run everyday under my user. this cronjob runs a script from my /home/jack/scripts/run.sh
clear
#
# su to root and run a script, return with result
# su -
# passwd
# run /getfile.sh
# return with result
# the result will copy 2 files from /prod/app/logs/ and... (0 Replies)
Discussion started by: karthikn7974
0 Replies
9. AIX
When we as normal user try to login, the session startup terminates and we are presented with the login screen.The root user is able to login without any problem.I can log in to the Aix server as normal user through telnet & using xmanager but not directly through server terminal .The Aix version... (1 Reply)
Discussion started by: ranadeep
1 Replies
10. Shell Programming and Scripting
I am writing a script that has some tasks that must be run as root, then set of tasks to be run as normal user, then again as root.
is there a way to switch between users in a script?
any other alternatives?
thx (3 Replies)
Discussion started by: melanie_pfefer
3 Replies
RMUSER(8) BSD System Manager's Manual RMUSER(8)
NAME
rmuser -- remove users from the system
SYNOPSIS
rmuser [-yv] [-f file] [username ...]
DESCRIPTION
The rmuser utility removes one or more users submitted on the command line or from a file. In removing a user from the system, this utility:
1. Removes the user's crontab(1) entry (if any).
2. Removes any at(1) jobs belonging to the user.
3. Sends a SIGKILL signal to all processes owned by the user.
4. Removes the user from the system's local password file.
5. Removes the user's home directory (if it is owned by the user), including handling of symbolic links in the path to the actual home
directory.
6. Removes the incoming mail and POP daemon mail files belonging to the user from /var/mail.
7. Removes all files owned by the user from /tmp, /var/tmp, and /var/tmp/vi.recover.
8. Removes the username from all groups to which it belongs in /etc/group. (If a group becomes empty and the group name is the same as the
username, the group is removed; this complements adduser(8)'s per-user unique groups.)
9. Removes all message queues, shared memory segments and semaphores owned by the user.
The rmuser utility refuses to remove users whose UID is 0 (typically root), since certain actions (namely, killing all the user's processes,
and perhaps removing the user's home directory) would cause damage to a running system. If it is necessary to remove a user whose UID is 0,
see vipw(8) for information on directly editing the password file.
If rmuser was not invoked with the -y option, it will show the selected user's password file entry and ask for confirmation that the user be
removed. It will then ask for confirmation to delete the user's home directory. If the answer is in the affirmative, the home directory and
any files and subdirectories under it will be deleted only if they are owned by the user. See pw(8) for more details.
As rmuser operates, it informs the user regarding the current activity. If any errors occur, they are posted to standard error and, if it is
possible for rmuser to continue, it will.
The options are as follows:
-f file The rmuser utility will get a list of users to be removed from file, which will contain one user per line. Anything following a
hash mark ('#'), including the hash mark itself, is considered a comment and will not be processed. If the file is owned by anyone
other than a user with UID 0, or is writable by anyone other than the owner, rmuser will refuse to continue.
-y Implicitly answer ``yes'' to any and all prompts. Currently, this includes prompts on whether to remove the specified user and
whether to remove the home directory. This option requires that either the -f option be used, or one or more user names be given
as command line arguments.
-v Enable verbose mode. Normally, the output includes one line per removed user; however, with this option rmuser will be much more
chatty about the steps taken.
username Identifies one or more users to be removed; if not present, rmuser interactively asks for one or more users to be removed.
FILES
/etc/master.passwd
/etc/passwd
/etc/group
/etc/spwd.db
/etc/pwd.db
SEE ALSO
at(1), chpass(1), crontab(1), finger(1), passwd(1), group(5), passwd(5), adduser(8), pw(8), pwd_mkdb(8), vipw(8)
HISTORY
The rmuser utility appeared in FreeBSD 2.2.
BUGS
The rmuser utility does not comprehensively search the file system for all files owned by the removed user and remove them; to do so on a
system of any size is prohibitively slow and I/O intensive. It is also unable to remove symbolic links that were created by the user in /tmp
or /var/tmp, as symbolic links on 4.4BSD file systems do not contain information as to who created them. Also, there may be other files cre-
ated in /var/mail other than /var/mail/username and /var/mail/.pop.username that are not owned by the removed user but should be removed.
The rmuser utility has no knowledge of YP/NIS, and it operates only on the local password file.
BSD
May 10, 2002 BSD