How can i prevent logging user1 from console?


 
Thread Tools Search this Thread
Operating Systems Solaris How can i prevent logging user1 from console?
# 1  
Old 09-17-2012
How can i prevent logging user1 from console?

Dear all,

i have two users user1 and user2 i want force user1 to login first by user2 and then su - user1

i want to prevent logging user1 from console directly
# 2  
Old 09-17-2012
Try setting the user1 shell in /etc/passwd to /usr/bin/false

That should stop him logging in interactively but not stop a su
# 3  
Old 09-24-2012
do u have another method ?
# 4  
Old 09-24-2012
Unless you tell us why that method will not work, any method we pick is likely to be the 'wrong' one.
# 5  
Old 09-24-2012
@Corona688: /usr/bin/false makes su useless. su is invoking the target user's shell after a successful login, thus su kind of succeeds but exits immediately.

Quote:
Originally Posted by maxim42
do u have another method ?
Here is one that works:
Make user1 a role and grant it to user2:
Code:
usermod -K type=role user1
usermod -R user1 user2

No direct login as user1 will be allowed.
Only root and user2 will be allowed to su to user1.
# 6  
Old 09-30-2012
@jlliagre thanks alot
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. OS X (Apple)

Does there exist a UNIX command to prevent docs' versions from uncontrolled erasing on logging in?

So far nobody on ASC, nor anywhere was able to respond to my issue and Google wasn't much of help either. I started to experience the issue some time ago: my OS is Lion 10.7.5. It occurs in all apps that have the function of versioning (iWork which I have updated up to v9.2, namely, Pages 4.2,... (0 Replies)
Discussion started by: scrutinizerix
0 Replies

2. Linux

Syslog not logging successful logging while unlocking server's console

When unlocking a Linux server's console there's no event indicating successful logging Is there a way I can fix this ? I have the following in my rsyslog.conf auth.info /var/log/secure authpriv.info /var/log/secure (1 Reply)
Discussion started by: walterthered
1 Replies

3. Solaris

"finger user1" pointing user1 and user2 as well why so?

Hello guys, on Solaris 10 os, I have this problem, When I finger one user it points to 2 user why so, -bash-3.2$ finger machova Login name: machovp In real life: raju Machova (LIB FinAcct User) Directory: /users/cz/182/machovp Shell: /usr/bin/ksh Never... (2 Replies)
Discussion started by: manalisharmabe
2 Replies

4. Shell Programming and Scripting

Event logging to file and display to console | tee command is not able to log all info.

My intention is to log the output to a file as well as it should be displayed on the console > I have used tee ( tee -a ${filename} ) command for this purpose. This is working as expected for first few outputs, after some event loggin nothing is gettting logged in to the file but It is displaying... (3 Replies)
Discussion started by: sanoop
3 Replies

5. UNIX for Dummies Questions & Answers

Windows to Linux remote console using VNC brings up blank console screen with only mouse pointer

:confused:Hi This was installed on the Linux box a few weeks back by a guy that no longer works for us. All worked fine until last week. Now when we connect its just a blank screen with no icons. I get a whole bunch of errors when starting the service too: Tue Feb 23 14:29:45 2010 ... (1 Reply)
Discussion started by: wbdevilliers
1 Replies

6. UNIX for Advanced & Expert Users

console /dev/console get image

We are using software (Pegasys) which runs on SunOS 5.8 and reads images from a Philips nuclear camera. The software is designed to run from the console. I need to be able to capture the images it produces on the display. The caveat is that I cannot use the X Windows display because the X Server... (3 Replies)
Discussion started by: sreyes27
3 Replies

7. Shell Programming and Scripting

User1 runs User2 scripts and updates logs?Is it possible?

Guys I have an odd request in hand. User1 Group1,Group2 User2 Group2,Group1 As can be seen ,both users belong to each other's group as well. Now User1 is holding some scripts(in a folder) on which perms are: 750 ..meaning User2 can read and execute but the execution is never successful... (1 Reply)
Discussion started by: ak835
1 Replies

8. BSD

Logging to /dev/console

Hi, The output of the cat ttys on a free BSD m/c console none unknown off secure # # Serial terminals # The 'dialup' keyword identifies dialin lines to login, fingerd etc. ttyd0 "/usr/libexec/getty std.9600" unknown on secure ttyd1 "/usr/libexec/getty std.9600" dialup off ttyd2... (0 Replies)
Discussion started by: mlalitha
0 Replies

9. Solaris

Prevent users logging in as root

I would like to know how to prevent users connecting to a server using SSH as root. I would still like them to be able to login with their username and then change to su. But I would like to prevent them logging in directly as root. I have searched the forum and read that I should set... (3 Replies)
Discussion started by: Sepia
3 Replies

10. UNIX for Dummies Questions & Answers

Logging all console activity to a file - how?

Hi all, Well I've had a bit more experience with Unix-like environments since my last post, now that I have started working on my website in earnest and am doing much of the file manipulation via the command line through SSH. The thing is, I want to be able to log all console activity,... (4 Replies)
Discussion started by: patwa
4 Replies
Login or Register to Ask a Question