Sponsored Content
Operating Systems Solaris Unable to switch back to root from user Post 302632315 by jim mcnamara on Sunday 29th of April 2012 07:30:19 PM
Old 04-29-2012
Code:
root> su username
username> ...  enter commands
username>
username>exit
root>

exit will get you back to root from":
Code:
 su - username

, which is probably the command you should use instead of
Code:
su username

su - [user] logs you in fully, executing all the that user's .profile settings.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Other than root user .Normal user is unable to create files

Hi all, I am using Sun Solaris 9 .In this system normal users unable to create files from the command line.I added these users in bin,adm and even root group i found them unable to create a file. (1 Reply)
Discussion started by: mallesh
1 Replies

2. Shell Programming and Scripting

Non-interactive user switch to root

Is is possible switch user from a non-root user to root user without entering the password interactively inside a korn shell script which is run by a non-root user? e.g. I have a non-root user called infodba who is in dba group and I want to create a shell script which is executed by infodba... (5 Replies)
Discussion started by: stevefox
5 Replies

3. Solaris

Unable to login as a User or Root on one client

I am running 5.10 Generic_120011-14 Sunblade 1500 I have one client that was working fine in a training environment. Then this week the user is unable to login as the user that is created by default. The students do not have access to root to change system files or user accounts. This is... (11 Replies)
Discussion started by: deaconf19
11 Replies

4. Shell Programming and Scripting

switch user from local user to root in perl

Hi Gurus, I have a script that requires me to switch from local user to root. Anyone who has an idea on this since when i switch user to root it requires me to input root password. It seems that i need to use expect module here, but i don't know how to create the object for this. ... (1 Reply)
Discussion started by: linuxgeek
1 Replies

5. Solaris

Unable to create or delete a directory in /usr with root user

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. UNIX for Dummies Questions & Answers

Not able to switch to other users using su -user from root

Hi all, I have a small problem. When I log in as root and try to switch to any other user using su -user, then it is giving an error saying libncurses.so permission denied. Can you help me? Thank you in advance. Sai. (1 Reply)
Discussion started by: sai2krishna
1 Replies

7. Shell Programming and Scripting

Switch between root and user in the same script.

I am writing a korn shell script where i need to switch to root in between and again exit from root to normal user and continue other commands. Is that possible to switch between these two in the same script? (1 Reply)
Discussion started by: santosh2626
1 Replies

8. UNIX for Dummies Questions & Answers

Unable to change password using root user

Hi, I tired changing password for mqm user in linux server with root user. But still I couldn't able to login mqm user with changed password. Can anyone please help on this. # passwd mqm Thanks, Anusha (4 Replies)
Discussion started by: Anusha M
4 Replies

9. Shell Programming and Scripting

How to switch user in shell scripting (without root)?

Hi everyone: I need create a script that must switch user and then must execute certain commands, sadly neither my user nor the second user have no privileges for su - , I've tried everything but seems su doesn't accept input redirection, please help me, ... (4 Replies)
Discussion started by: ooilinlove
4 Replies

10. Shell Programming and Scripting

How to Switch from Local user to root user from a shell script?

Hi, I need to switch from local user to root user in a shell script. I need to make it automated so that it doesn't prompt for the root password. I heard the su command will do that work but it prompt for the password. and also can someone tell me whether su command spawns a new shell or... (1 Reply)
Discussion started by: Little
1 Replies
lpoptions(1)							    Apple Inc.							      lpoptions(1)

NAME
lpoptions - display or set printer options and defaults SYNOPSIS
lpoptions [ -E ] [ -U username ] [ -h server[:port] ] -d destination[/instance] [ -o option[=value] ] ... [ -o option[=value] ] lpoptions [ -E ] [ -U username ] [ -h server[:port] ] [ -p destination[/instance] ] -l lpoptions [ -E ] [ -U username ] [ -h server[:port] ] [ -o option[=value] ] ... [ -o option[=value] ] [ -p destination[/instance] ] -r option lpoptions [ -E ] [ -U username ] [ -h server[:port] ] -x destination[/instance] DESCRIPTION
lpoptions displays or sets printer options and defaults. lpoptions shows the default printer options when run with no arguments. Other options include: -E Enables encryption when communicating with the CUPS server. -U username Uses an alternate username. -d destination[/instance] Sets the user default printer to destination. If instance is supplied then that particular instance is used. This option overrides the system default printer for the current user. -h server[:port] Uses an alternate server. -l Lists the printer specific options and their current settings. -o option[=value] Specifies a new option for the named destination. -p destination[/instance] Sets the destination and instance, if specified, for any options that follow. If the named instance does not exist then it is created. -r option Removes the specified option for the named destination. -x destination[/instance] Removes the options for the named destination and instance, if specified. If the named instance does not exist then this does nothing. If no options are specified using the -o option, then the current options for the named printer are reported on the standard output. Options set with the lpoptions command are used by the lp(1) and lpr(1) commands when submitting jobs. ROOT ACCOUNT OPTIONS
When run by the root user, lpoptions gets and sets default options and instances for all users in the /etc/cups/lpoptions file. COMPATIBILITY
The lpoptions command is unique to CUPS. FILES
~/.cups/lpoptions - user defaults and instances created by non-root users. /etc/cups/lpoptions - system-wide defaults and instances created by the root user. SEE ALSO
cancel(1), lp(1), lpadmin(8), lpr(1), http://localhost:631/help COPYRIGHT
Copyright 2007-2011 by Apple Inc. 29 August 2008 CUPS lpoptions(1)
All times are GMT -4. The time now is 05:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy