Sudo su password9/3/2023 (I have sudo -K in my shells logout script too. If your system supports it, if you logout then login, sudo will request your password again. Administrators should not rely on this feature as it is not universally available. On Linux systems where the devpts filesystem is used, Solaris systems with the devices filesystem, as well as other systems that utilize a devfs filesystem that monotonically increase the inode number of devices as they are created (such as Mac OS X), sudo is able to determine when a tty-based time stamp file is stale and will ignore it. When the tty_tickets option is enabled in sudoers, the time stamp has per-tty granularity but still may outlive the user's session. If disabled, the time stamp of the directory is used instead. With this flag enabled, sudo will use a file named for the tty the user is logged in on in the user's time stamp directory. If set, users must authenticate on a per-tty basis. Shawn's answer is great but there is an additional configuration option that might be useful in this situation. Value less than 0 the user's timestamp will never expire. Number of minutes that can elapse before sudoĬomponent if minute granularity is insufficient, for example 2.5. (if one is required by the security policy) and will not update the As a result, sudo will prompt for a password How can I pass a password to the 'su' command Ask Question Asked 14 years, 6 months ago Modified 6 years, 11 months ago Viewed 14k times 3 I have a program that is going to take a password as input and then do a shell execute to perform a 'su' (switch user) command in UNIX. Require a password, this option will cause sudoĬached credentials. When used in conjunction with a command or an option that may k When used by itself, the -k (kill) option to sudo invalidates the K The -K (sure kill) option is like -k except that it removes the You can even put the command afterwards, like sudo -k test_my_privileges.sh
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |